Failover support fixes

1. Remember active server between requests
2. Retry with other server if database is not accessible on current
active server