Fixed an unexpected exception bug when reconnecting in pub/sub mode if selected_db is not null

RedisClient might enter pub/sub mode after at least one SELECT command issued.
When reconnecting, the SELECT command is issued after restoring pub_sub_command to true, which causes an exception.
Add retry_max_delay option
- add option
- add test
Formatting
Docu
Merge branch 'add-retry-max' of https://github.com/tomaszdurka/node_redis into tomaszdurka-add-retry-max
Add docu for options: max_attemps connect_timeout
Merge pull request #405 from tomaszdurka/issue-405

Add docu for options: max_attempts, connect_timeout
Spelling fix in the docs.
Add a test case for reconnect_select_db_after_pubsub
Fixed a subtle error where commands issued within the idle event handler
Merge branch 'select_db_exception' of https://github.com/roamm/node_redis into roamm-select_db_exception
fix bug when callback is undefined