Fixed workdir get_changeset method for mercurial

- the workdir get_changeset method should return currently checked out
  revision and not the latest one in repository

--HG--
extra : rebase_source : 5b344e89bd23c7b78bfba940ab2a73fcab17a321
extra : amend_source : bd8e25c55c5cfc737765c7a9b6fdd8c8f4ea7212
Better workdir tests, fixed git commit method.

Removed repo.refs.set_symbolic_ref('HEAD', ref) as it
does similar to what branch checkout does without updating
wokring directory files (which should not occur at
in memory commit)