PHANTOM-76: Add lightweight transaction support for inserts. PHANTOM-75:...

... Re-structure the query mechanism to allow more efficient sharing of methods.