Faster log rename detection

Speed up `Repository#log` when the `:follow` option is given.