Added EntityId and EntityIdParser in JS

Rebased -- jeblad

Change-Id: I361f90c59b6c9e132be2268e0d4a3d15763e35c1