Use angular JSON methods for socket ops

Changed conversion of incoming/outgoing data to angular specific JSON methods. Especially removes $promise / $resolved variables that otherwise cause issues when inserting data in databases (i.e. mongodb).
Merge pull request #12 from marco4net/patch-1

Use angular JSON methods for socket ops