Remove and 301 redirect trailing slashes in URLs

This adds a rack rewrite to 301 redirect URLs with trailing slashes to their non-trailing slash counterpart.

cc/ @jlong