PHP-942: Throw MongoDuplicateKeyException on duplicate key errors
11001 and 12582 are also valid duplicatekey error codes
Add the error code into the test, per pr review
Merge pull request #559 from bjori/PHP-942-duplicate-key-exception

PHP-942: Throw MongoDuplicateKeyException on duplicate key errors

* bjori/PHP-942-duplicate-key-exception:
  Add the error code into the test, per pr review
  11001 and 12582 are also valid duplicatekey error codes
  PHP-942: Throw MongoDuplicateKeyException on duplicate key errors
PHP-941: Throw MongoConnectionException on stream failures

We need to be careful to restore it after each stream call, and most
importantly before mongo_manager_log(), otherwise those log entries
could throw exception
Add test for converting a stream warning into exception
Fix build with PHP 5.2 from 2006
Skip test on 5.2, tottally different looking exception
Update to use macros for PHP 5.2 compatability
Merge pull request #558 from bjori/PHP-941-throw-mongoprotocol-on-stream-failure

PHP-941: Throw MongoConnectionException on stream failures

* bjori/PHP-941-throw-mongoprotocol-on-stream-failure:
  Update to use macros for PHP 5.2 compatability
  Skip test on 5.2, tottally different looking exception
  Fix build with PHP 5.2 from 2006
  Add test for converting a stream warning into exception
  PHP-941: Throw MongoConnectionException on stream failures
PHP-944: Support $out aggregation pipeline operator
Add a comment that the value of these is significant
Remove trailing new line and add a newline between the functions as requested
Bump to E_WARNING and add MongoLog output as per review
Merge pull request #557 from bjori/PHP-944-out-aggregate-pipe

PHP-944: Support $out aggregation pipeline operator

* bjori/PHP-944-out-aggregate-pipe:
  Bump to E_WARNING and add MongoLog output as per review
  Remove trailing new line and add a newline between the functions as requested
  Add a comment that the value of these is significant
  PHP-944: Support $out aggregation pipeline operator
Really fix build on 5.3.3. Fixes PHP-948

These version macros really need to be unified
Merge pull request #563 from bjori/PHP-948-fixbuild

Really fix build on 5.3.3. Fixes PHP-948

* bjori/PHP-948-fixbuild:
  Really fix build on 5.3.3. Fixes PHP-948
Moving shared stuff out to cursor_shared.c

Of course, the command cursor does not exist yet, so this is preliminary work.
Moved (some) code that is going to be shared by cursors and command cursors to a shared file.
Rename mongo_throw_cursor to php_mongo_throw_cursor and move it to cursor_shared.c.