Efficiency

* Use `ResultBuffer.EMPTY` instead of `ResultSequenceFactory.create_new()`
* Remove unnecessary calls to `ResultSequenceFactory.create_new`
* Use `XSBoolean` more efficiently