Rework implementation of findHash
Rework implementation of findHash

- Add a leadingZeroes parameter defaulting to 5
- Move the leading zeroes counting logic into a helper function
  for readability

kenada/advent-of-code,kenada/advent-of-code