Add inferred macro

inferred(f(x)) calls f(x), checks that typeof(f(x)) matches the
inferred return value, and passes on the return value. See discussion
in #5404

(No at signs in this commit to avoid noise)