Feature high availability

Add features for making okapi more robust. This way, if the DB is not available, the application using okapi will not fail, it will simply stop logging request stats.

@gball please, take a look whenever you can.