day 08 generator: extract best_by_gap
day 08 generator: extract best_by_gap

It's only being used once right now, but I'll use it again soon.

petertseng/adventofcode-rb-2016,petertseng/adventofcode-rb-2016