The world should impose a moratorium on the sale and use of surveillance software until there are rules in place to stop governments using it to spy on their opponents and critics, a U.N. expert recommended.