UC-1155
http://track.sipfoundry.org/browse/UC-1155

Tracker addressed 2 issues:
- eliminate core dumps generated by unsynchronization between
sip services and mongo ( in case mongo hadn't finished its
initialization phases and sip services tried to use mongo a
core dump would have resulted)
- eliminate core dumps generated by mongo tcp opperations

First issue doesn't require fixing because
- proxy and registry return a 500 error message when sending a
request to mongo
- saa and rls check the connection with mongo. If the connection
isn't established then the service exits

Second issue
- moved the catch_global function in a header file since it was
duplicate
- added a catch for treating exceptions for the tcp opperations
from mongo
- there are no more core dumps for mongo tcp errors