Refactored error handling mechanisms for parsing.

- This is needed to make passing error handling devices into more pieces of the parser easy.

#210

/cc @pranavkm 
Also, any reason why you couldn't just pass in the actual `ParserErrorHandler` instance rather than pass in a factory?