Bug 1029967 - rewrite Makefile in email app in javascript

It makes me uncomfortable to be using promises for all these items, since promises can complete async and out of order. I would rather see a linear execution of tasks to ensure we do not hit racy conditions down the line.

The use of promises may have been prompted by the callback style of the r.js optimize call. What I would likely do instead is just to keep that one action promise/aysnc, then in a `then` chain from it, execute the removeLoader, writeCacheValue and removeFile calls as a list of synchronous function calls. That will also reduce some of the noise around promises in those other functions.