Added helper functions that check various server states. This makes the readwritesplit code easier to read as the function names convey the intention better than the macro invokations.