AppRTC: Split main.js over several files.

The functions in main.js have been moved to other files grouped by category. This is a pure copy/paste operation for all JS code.
Includes an apparent typo fix for ga.js.