Report static error on 'return' outside method

A return statement can only appear inside a method and not at the top
level or inside a block at the top level. Previously, this error was not
reported statically and was only found at runtime, but it will now be
reported as a syntax error.