More helper functions for using DMatrix for bitwise operations
Refactored IntegratorInternal::spEvaluate using helper functions, #934