Added documentation for the callback function for queryToArray and queryToStruct

The queryToArray and queryToStruct functions now take a second
parameter which can be a callback function that each data element is
passed through before the data element is added to the Array or
Structure respectively.
fix some minor typos.
Merge pull request #1 from bpamiri/master

Added documentation for the callback functions for queryToArray and queryToStruct