[Bug 879292] Cleanup of unused code [r=crdlc]

https://bugzilla.mozilla.org/show_bug.cgi?id=879292

Deletion of unused modules and cleanup of the code. Mostly to speed up initial loading, and to simplify the already-too-large code.