Avoid infinite loop in CompileException

CompileException#showCodeNearError gets into an infinite loop when there is a compile error on an expression that starts with a newline. This patch simply calls String#trim on the expression string before searching for the exact piece of code to use as the error message, as well as adding a test that will trigger the infinite loop if the fix is not in place.