Improve QueryWriter interface.
Improved Replica2, also generates plain PHP file.
P533 patch
Update travis file.