move from ServeMux.HandleFunc to http.Handler

This way we can wrap it in a timeout handler and
return timeouts if it is taking too long.