Moved the branch functions into their own namespace

To facilitate reuse.
BugFix: storm pre 0.9.0 requires lein1.

We test which branch is being used - if it is <0.9.0 we use lein2
(currently 2.3.2), otherwise we use lein1 (currently 1.5.2). This
addresses a bug reported by Ryan Ebanks on the mailing list:
https://groups.google.com/forum/#!topic/storm-user/5qOUkMfXkj4
Merge pull request #48 from lorcan/customlein

lein1 is used for deploying storm <0.9.0, otherwise lein2 is used.