Move base64 response encoding into BinaryResult

Make it easy for any RestApiView to return binary data within a
base64 wrapper by marking a BinaryResult with base64() before it
is given to RestApiServlet. The servlet will process the base64
wrapping before gzip encoding, which may save on transfer cost.

Change-Id: I5ed7b8cb2b034b60654cc2574e627159b11a4f27
3 files changed