Cleanup replaceTokens

* Allowed both the `$...$` syntax and the `${...}` bash syntax
* Removed by reference stuff, it's not needed.
* Introduced a cleaner way of replacing by using `preg_replace_callback`

Fixes https://github.com/bldr-io/bldr/issues/100