Add models and tables for branches and tags
Properly save branch and tag info

This commits adds proper saving of tag and branch names after build
creation. The information is not used anywhere for now and thus
commit.branch and build.branch is still populated for backwards
compatibility.