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

https://bugzilla.mozilla.org/show_bug.cgi?id=987487
I don't know why but it seems to have no effect at all.
I haven't looked at the traces, may be it always throw?