Bug 1029967 - rewrite Makefile in email app in javascript

An onFileRead call can be here too. Even though email did not do that before for digest calculations, it is also fine if it does, and allows this function and how onFileRead is called to be uniform.