Add customizable CSRF error handling #2511

- Add test code and support handling for Java
- Create ErrorHandler trait/interface to unified interface between Scala and Java
Merge pull request #2511 from tsuyoshizawa/cutomizable-csrf-error

Add customizable CSRF error handling