Coopr 581: Implement node hours REST API

Some query fields can be {@code null}, so we must dynamically construct prepared statement.