Fix bug where retries were not being properly set

Stung by the infamous isset() vs null issue in PHP.  Need to check if
the `retries` param is set OR if it is null, since the default set
of config options set `retries` to null.

This bug prevented retries from taking place, which meant that under
normal operating scenarios a bad host could take down the client with
an exception, when it normally should have retried on a different host.
Fix bug where retries count is set incorrectly

The default number of retries should be count of hosts minus 1, to
account for starting arrays at zero
markAlive() and markDead() should also set lastPing time

The act of marking a node dead or alive means it was tried via a
normal API call.  Since some connection pools don't ping, we should
use markAlive/Dead as proxies for pinging to optimize cluster
load balancing (e.g. not repeatedly trying to call a dead node
because it doesn't have a ping timeout)