Handling of DBRefs updates

1. Added Methods to handle DBRefs updates in cached objects that are persisted in hash map. As well as unit test for the case 
2. added FongoDBCursor implementation to bypass NPE in Mongo.isMongosConnection() method. This is unclear case for me and is rarely reproduced. I don't even understand how. I've created pull request to mongo java driver https://github.com/mongodb/mongo-java-driver/pull/111, not sure that it will be accepted though as the case is really vague. 

Both fixes are ugly in my opinion, so any comments if refactoring has to be done are welcome