Merge Michael's work and fix some tests
Fix some collection names
Copy sessions in pinger
Update dependencies.tsv
Only copy session if a database login has been performed
Merge master and resolve conflicts
Fix megawatcher inconsistency
Code review tweaks
Found another place where collection needs to copy session
Merge pull request #361 from wallyworld/copy-session

Do not use global sessions

Each time a mongo interaction is performed, the session is copied using session.Copy() to ensure a fresh socket is used if needed. The basis of the change is to remove the "global" mongo collections on state.State and refresh each time one is used. A similar approach is used with the transaction runner.

The changes essentially follow the mgo driver guidelines:
newSession := session.Copy()
defer newSession.Close()
<do stuff with newSession>

During bootstrap, state.State is created using a session that has not had Login() called. For this case, the session is not copied as there are no stored credentials yet. An authenticated bool is added to state.State for this purpose.