Some changes to qcd

Hi Gustav!

I have made some changes in qcd.

1) Support on MacOS and other systems that by default uses a different db that the one that comes with GNU:
    - handle the situation when the selected dbm adds the extension .db to the resulting file
    - handle the situation when the selected dbm does not support iteritems()
2) Support for multiple machines and one host.
3) Some little refactoring.

And for the moment that's it. I'm planning later on to add modulecmd support, so people can add it easily to their envs.
See ya!

Arturo