Replace instanceof Object with Object::toString.call(..) -- Related to #1555
Fixes a problem with how we count num_active_writes in the merger serializer.
Check only objects and not null/array for the host. Related to #1577
Put __index in the array if the user uses the cursor interface + fix maximum call stack exceed error -- Related to #1578 and #1584
Have the same interface for toArray between cursors and array
Remove unnecessary check against function
Remove extra parenthesis
Don't reset the stack at the first call of next
Fix tests because of the behavior or setImmediate
Remove ul suffix from MESSAGE_SCHEDULER_GRANULARITY

Otherwise it does not compile on 32 bit platforms.

Review 998 by Daniel Mewes
fixing python rql tests
Merge branch 'daniel_1471' into next
Merge branch 'next' of github.com:rethinkdb/rethinkdb into next
Merge branch 'michel_1577_connect' into next
Merge branch 'michel_1578_maximum_call_stack' into next
Merge branch 'michel_1555_instanceof' into next
Merge branch 'next' into sam_97_alt