refactor to use dircache for dirty workdir checks

now using the dircache to check for dirty workdir prior to doing a checkout.
aldo now support doing a checkout without doing the check to implement
support for "git reset --hard"., though for now that is implemented in lib
client instead of here. also the check returns the modified/new files in
the workdir to allow it to actual be used to implement "git status" soon.