The head of Colombia's national police has resigned amid allegations of running a male prostitution ring with the help of other police officials.