tool to build SmartOS changelog

Ugly as sin, but it even works in a Mountain Gorilla checkout where origin is in the cache directory and don't have the other branches visible...
This line is broken and I'm not sure what the correct mechanism for determining the preceding release branch should be. This also currently breaks in interesting ways when e.g. working on a topic branch of smartos-live...

Any suggestions?