Fix copy paste of comments in Firefox

Copy hash was including comment nodes, but paste hash
wasn't (as they get stripped), so modify hash function
to only look at usable nodes (element & text).

Change-Id: I27b0a86e0175ccf2d71261cb8d36fd20aff900b8