Tweak some mongo timeouts and refactor multiple bits of mongo functionality into a single mongo package
Tweak setmongopassword api
Tweak some mongo timeouts and refactor multiple bits of mongo functionality into a single mongo package
Tweak setmongopassword api
Merge branch 'mongo-refactor-timeout-tweaks' of https://github.com/wallyworld/juju into mongo-refactor-timeout-tweaks

Conflicts:
	cmd/jujud/machine.go
	cmd/jujud/machine_test.go
Refactor SetMongoPassword api, various fixes
Merge pull request #72 from wallyworld/mongo-refactor-timeout-tweaks

Mongo timeout tweaks and refactoring

This started out as a branch to fix intermittent CI test failures. Certain tests were failing due to socket timeout errors when updating admin user creds in mongo. These operations were happening during test setup or teardown where not much other mongo activity is happening but the system would be busy. We were setting the mongo socket timeout to only 10s (which matches the mongo internal ping period). My theory is that the mongo socket timeout is too short and the busy system sees the socket timeout expire before data can be transfer and the socket is closed. I changed the timeout to 21s (2 x internal heartbeart time plus a bit).

The socket timeout was being set in a couple of places. And we had mongo specific stuff inside state. So I gathered the main bits of mongo functionality from state and moved agent/mongo to mongo and put it all in there. So the mongo stuff is all together and out of state.

I also updated the AddUser calls to UpsertUser because AddUser is deprecated in 2.4