Move sock JS code into its own file.
Merge pull request #1328 from edx/christina/toggle-sock

Move sock JS code into its own file.