Cleanups, Fixes, and Improvements

I removed the "only build addons on Linux" bit...and then I cleaned up things a lot more, and split all the functionality out into functions and put those in a separate file for cleanliness and readability.

I also tossed in some other fixes. If you could test and make sure this works on windows and Linux, then merge, I think it's the right direction for us to take on this, as it cleans things up and makes the chain of operations more clear.

The primary improvement aside from all the cleaning and splitting into functions is that instead of building based on the git rebase/merge output, we're using the hash of the last version we built to determine if a rebuild is necessary or not. I think this will work better on the Mac, which hasn't been building properly on cron.