added some helper functions, added a lot of PHPdoc comments and fixed a dbCursor freeing bug by creating/using FinallyCursor.php instead of FinallyBlock.php.

Signed-off-by: baracudda <ryan.fischbach@istresearch.com>