Fix Bugsense reported NPE.

Branch selection needs mRepository to be initialized.
Fix some Bugsense reported NPEs.
Fix handling of refs in bookmarks.

Ref and branch tag are two sides of the same medal, with the branch tag
representing different refs over time. When storing both the ref and the
branch tag in the bookmark and coming back to that bookmark at some
later point in time, the presented data will (unexpectedly) be the state
of the branch when the bookmark was created instead of its current
state.
Fix that by using the selected branch tag as ref if it's known (by
branch or tag selection), and the ref otherwise.
Fix branch/tag select dialog cancel behaviour.
Fix non-Holo alert icon on API level > 10.