Make reflog part of refdb

Put the two together in code, as they belong together logically and make them a lot more name-based instead of needing to look up a ref.