Updates to the servlet filter and JSON builder

It doesn’t look like the existing servlet support was functional. The
servlet-api dependency is now optional.