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

Some cleanup before moving the code to commonlib