Fix query preparation & clean up line breaks somewhat

We used 'prepared' in several places instead of the correct 'prepare', which
means that our queries were not prepared at all.

Also break some over-long lines and detabify index.js.
Fix type errors in tests

Our tests were passing strings instead of buffers in several places, and with
prepared statements those now emit warnings. Fix them.
Merge pull request #30 from gwicke/master

Fix query preparation & type warnings in tests