Switching to lazy SQL compilation.

Compiled statements are now created as needed.
This will help with two issues:
1. slow startup performance
2. inability to close and reopen database w/o a restart

Change-Id: I1ec13994979caa92b7d4edc12046b4be0f989ba3
2 files changed