Add Repository#last_completed_build(branc)
Implement simple states cache at StatesCache

StatesCache caches the status for given repository and given branch.
It's purpose is to allow easily store information needed to quickly get
state for given repo and branch, for example in order to generate status
images.
Add StatesCache addon
Use states_cache in StatusImage