rdbms: cleanup code for read-only propagation for master connections
Make "readOnlyReason" immediately propagate from LoadBalancer to the
DB handle even when getConnection() with DB_REPLICA yields a master
DB handle. This can happen when the master has a non-zero "load".
Previously, it would not be set until something later used DB_MASTER
with getConnection(). This didn't really effect anything but seemed
confusing.
Short-circuit getLaggedReplicaMode() when the reader index uses the
master DB since there is no chance of lag. Also simplify it to just
calling getReaderIndex(), which since nothing else is needed to set
the "laggedReplicaMode" field.
Also rename "readerIndex" field to "genericReadIndex" and "loads"
field to "genericLoads" for clarity.
Change-Id: I6dc28933d2f94f0de1e8f9c5b2b8d2cf8a1a9d08