Add test mechanism for query optimizer

It is based on Rroonga.