Making a conditional check for type parser

The code is failing with pg-copy-streams.  The pg-copy-streams creates a query object but it doesn't have any _result.  Make the type parser an optional only when _result object available on query then only set the type parser.
Added test cases for issue #699
Merge branch 'master' of https://github.com/kesavkolla/node-postgres into kesavkolla-master
Fix test
Merge branch 'kesavkolla-master'