Handle the possibility that build_intervals will fail.  Let the invoker of build_intervals return false, and set the stat so that other threads awaiting the completion of build_intervals will also return false, instead of spinning forever.
Handle the possibility that build_intervals will fail.  Let the invoker of
build_intervals return false, and set the stat so that other threads awaiting
the completion of build_intervals will also return false, instead of spinning forever.

HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit