Reduce repeated code by moving into shared functions

* In following areas:
   - Structure/Unit Auras
   - Tech/Phase Time cost
Change which license this mod is released under.

* I permit this mod to be shipped/merged with core 0AD project
* Resolves #6
Update branch from master
Merge leper's work into A18 master
Adjust jshint tags