add branch query parameter to commit view

Same as before but using a query parameter instead of URL segment, to be consistent with other pages and to be compatible with branches with `/` in their name.

If the query parameter is not provided it defaults to `master`.