Handle entities properly while escaping template args

* {{echo|&ndash;}} was serializing back to {{echo|–}} because
  the content in mw:Entity span is the decoded entity rather
  than original source.

* Added a parsoid-specific test to catch regressions.

Change-Id: I6063e93aebfe656641c714939a5962f2004cc346