A UN watchdog has urged China to end the rampant use of torture in its prisons and close all secret jails.