Close stream, minor refactoring
Upgrade SLF4J
For #1808: use SLF4J

- use jcl-over-slf4j
- use slf4j API dependency
- remove passing of ServletContext
- log with SLF4j instead
- add basic logging