Support format=TEXT for /+refs

List refs in the same format in an /info/refs request for the git
protocol, plus some minor sanitization to deal with XSS. Support scoping
of refs by adding additional path components (e.g. /heads) after /+refs.
This means allowing refs views with paths, but note that this only
applies to the TEXT (and soon JSON) format, not HTML.

Change-Id: I7c7074544af366f38791d5a90d0a024d2555c92e
8 files changed