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.
Moved non-shared utility functions into the .c file and make them static.
Header file maintenance.
New command_cursor file with some boiler plate.
Better warning flags.
Added folding markers and function comments.
Compiler warnings
Rename "buffer" to "mongo_buffer".

The original declaration put "buffer" in the global scope, but we also used
"buffer" as a variable name. We can't really do that (says GCC/ANSI C).
Get rid of flags we don't want.
Refactor out the namespace validation.
Moved mongo_util_cursor_reset to a shared php_mongo_cursor_reset so that it can be reused.
Get rid of arginfo and function entries for methods we're not going to add.
Implement MongoCommandCursor::__construct
Fixed copyright headers.

cursor_shared.* contains code from earlier, so that's why there is 2009-2013 in
the header.
Refactor out splitting a namespace into its db and collection names.
Add missing database and read preference initialisation.
Make it compile and use the correct constructor.
Wire in MongoCommandCursor::rewind and put in place holders for the others.