Bug 1029385 - Rewrite app-makefile rule in javascript

This doesn't replicate exactly what was done in Makefile.
We support regexp in BUILD_APP_NAME, so that you can do `BUILD_APP_NAME=system|camera make` or `BUILD_APP_NAME="c*" make`. That would be great to keep this feature!
That would need some refactoring to this code to not use `some()` as you could match more than one app.