Added an extra test case for PHP-637.

The code was working fine, but a very specific test case doesn't hurt of
course.
Added an extra test case that goes through writing/reading MongoDate.
Fixed typoes.
Merged pull request #257
Renamed macro to its upper case version and removed the variable declaration.

CS states that all macro names should be upper case. The embedded variable
declaration confused me and it can easily introduce "declare after code" issues
with MSVC.
Fixed PHP-656: Add host, port and node type to the MongoCursor::info() return value.

This is also mightily helpful for figuring out which host/port and type of node
the query was read from.  It's also useful for tests, notably for the tests of
PHP-639.
Changed force_primary to just set a flag on the cursor.

This means we no longer have to request the connection twice, and it also fixes
a bug that made the tests for PHP-511 fail.
Don't initialize cursor read-prefs in constructor or just before running the query.

Doing this allows us to modify read preferences after the cursor has been
created without special hacks. This is a pre-cursor to fixing PHP-483 but also
allows us to fix PHP-639 (this branch/PR). The read prefs are still set after
MongoCollection::find() created the cursor.
Fixed some test cases

Still issues with tags, but I don't quite know how to address this!
Fixed PHP-639: MongoCursor::slaveOkay() has no effect.

Set the read preference in slaveOkay on the cursor, besides
just setting the cursor flag.

Setting the cursor flag isn't strictly necessary, as we set it when
the RP isn't PRIMARY in do_query anyway.
Fixed MongoCursor->slaveOkay(false) and added support for MongoCursor::$slaveOkay.

In order to support slaveOkay(false), I've moved the parameter parsing into the
slaveOkay method and substituted the -1 (which means that parameters would be
parsed in set_cursor_flag too) for the value. If I wouldn't have done that, the
parameters would have to be parsed twice.

In mongo_cursor__do_query I moved setting the cursor opts to below the
new check for the static property value of MongoCursor::$slaveOkay, so that
its value is also taken into account.

I've also added a bunch of extra tests!
Move zslaveokay to a scoped variable.
Make slaveOkay(true)->slaveOkay(false); etc also work.

With slave_okay being true or absent, the RP is switched to SECONDARY
PREFERRED but only if the current configured RP is PRIMARY - so that
other read preferences are not overwritten. As slaveOkay really only
means "read from any secondary" that does not conflict.

With slave_okay being false, the RP is switched to PRIMARY. Setting it
to PRIMARY when it already is PRIMARY doesn't hurt.
Fixed MongoCursor::$slaveOkay = true; followed by $cursor->slaveOkay(false).

Moved the read preference inheritence from after the __construct call to
before, so we can safely use the MongoCursor::$slaveOkay check/update in the
constructor. This allows us to move the $slaveOkay check from the do_query
method to the constructor, which then makes this issue work.
Merged pull request #261