Update brew.plugin.zsh

Add `brew cleanup` command to `bubu` alias
Merge pull request #2969 from nicolas-brousse/patch-1

Update brew.plugin.zsh
Refactor similar functions into common sections
Fix take function

Before the modification, the `take` function will try to cd
into the created directory even if mkdir throws an error.

With this modification, if mkdir fails to create the directory,
cd won't run and the take function will return the mkdir exit
code.