Free all cached list of reference when reloading the references

This fixes a bug where stale reference lists where used after a new
branch was created via the branch view.

Fixes #196