SQL template generator for entropy queries

This provides a facility to introspect a database (sqlite for now) in order to build a SQL template that can be used to build merkle trees.