This function suppresses messages and captures output from an expression. Note that this does NOT return the result of the expression! It is intended to be used in contexts where certain operations with side effects are performed but the verbosity should be suppressed.