Martini middleware/handler for easily rendering serialized JSON and HTML template responses.