SERVER-16651 Avoid global lock acquisition in tryToGoLiveAsASecondary() if a primary or secondary.

Only nodes in state RECOVERING will attempt a state transition in
tryToGoLiveAsASecondary(), and we have a lock-free way to check if a node is in
one of those two states.  The danger of asking the question, "is this node in
either primary or secondary state?" without holding the global lock is that the
answer might change at any time.  However, only tryToGoLiveAsASecondary() causes
it to transition from "no" to "yes", and if it transitions from "yes" to "no",
we know that tryToGoLiveAsASecondary() will be called again promptly.
SERVER-16651 Ensure that single-node replica sets pass through SECONDARY on way to PRIMARY.

Before this patch, such sets would transition directly from RECOVERING to
PRIMARY at start-up, which is not a valid arc in the state transition diagram
for replica set member states.

This patch also consolidates the logic for transitioning from SECONDARY to
PRIMARY in one place and resolves some minor concurrency and consistency errors
therein.