handle object input for prepared statements

The current code does not handle the case where the input to query() is a plain object for creating a prepared statement (see https://github.com/brianc/node-postgres/wiki/Prepared-Statements).

This patch checks whether the first parameter is a plain object and whether the values in the object are also inside an object (instead of an array). If so, the monkey patch is applied.