Fixes #828: refactored QueryBuilder::build()
Fixed test break.
Make sure query cloning works as expected.
gii form width adjustment.