Added hg module to the core.
Merge remote-tracking branch 'upstream/devel' into devel

Conflicts:
	library/hg
Rewrote hg module based on feedback.

1. state option is removed
2. force is hg update -C
3. purge is hg clean/hg purge but default to no
4. relies on hg abililty to handle errors
Use %s instead of .format for string replacement. Revisied the documentation.
Changes is now determined by simply comparing before,after and cleaned (purge and/or force). Doc is updated.
Merge remote-tracking branch 'upstream/devel' into devel
Merge pull request #1948 from yeukhon/devel

hg module cleaned up