Bug 987487 - [Gaia] [Build] Refactoring webapp-optimize.js and unit tests

https://bugzilla.mozilla.org/show_bug.cgi?id=987487
If that doesn't work / is never used, let just not land this piece of dead code.