Merge pull request #109 from rrb3942/shutdown_segfault

Reset prepared statement between query lists on shutdown