Support non-unique taxonomy -> IMT association across different vulnerability files

Addresses https://bugs.launchpad.net/oq-engine/+bug/1171782

I have also performed some minor refactorings like:

1) moved a bunch of functions called ```write_foo``` to a proper module ```writers``` and renamed them to ```foo```.
2) renamed ```general.py``` to ```base.py``` as now this file contains only the base risk class calculator