[JENKINS-25444] CliGit implementation of fetch/deleteBranch does remove

open changes, JGit does not

Created testcase, perform a reset --hard in case of "ref checkout" and
"branch with delete checkout" to simulate CLI behaviour.