Line counting with soft dependency on Alfresco RhinoScriptProcessor

This change enables line-counting for determining the correct line offset to be used in exception markers without a hard dependency on the Alfresco default RhinoScriptProcessor. This also includes some minor improvements in detecting line endings and line-handling of user scripts with exceptions.