Removed useless or obsolete code in openquake.engine.utils.general

Some cleanup before moving the code to commonlib https://bugs.launchpad.net/oq-engine/+bug/1294601.