refactor `brew cask cleanup`

Divide into more tractable methods. No functional change.

Change apparent typo in test regular expression
detect cached downloads in doctor

and recommend "brew cask cleanup" if present.

Closes #4857
Merge pull request #4980 from rolandwalker/cleanup_refactor

detect cached downloads in doctor