Buffer should be per database instance

This is a fix for #51, where multiple db instances share a buffer and will lead to invalid results.

I looked for some tests to run the docs don't seem to mention how that is done