Memoize total_branches
Memoize total_branches

I'm not super happy with this function in total (it's mostly used
for counting/size and we could use coverage data now) but I don't
want to break interface as much right here. So for compatibility
this helps it not create arrays all over the place all the time.

colszowka/simplecov,colszowka/simplecov