Allow InputTransformers to raise SyntaxErrors

This is a relatively trivial modification of the IPython main loop to
catch a possible SyntaxError and print it instead of
quitting. Doctesting this change is somewhat tricky since we actually
need to run the main TerminalInteractiveShell.interact() loop, and is
done through a subprocess and piping in a testcase.

As discussed recently on http://python.6.x6.nabble.com/Raising-a-SyntaxError-in-InputTransformer-td5027773.html