enable tb to return just max or min time

make TimeBoundaryQuery.buildResult static and reuse it here?