support emacs 24
Delete previously completed part based on the length.

This fixes a bug where invoking minibuffer-complete many times when
the minibuffer value is something like "~/dir1/~/" ends up having
"~/dir1/~/./dir1/dir2/dir3/....".

A path name in the minibuffer may not necessarily be an existent path,
so it is not appropriate to use file-directory-p to check if the last
candidate was a directory.  Instead, we can simply use
mcc-completion-begin and mcc-completion-end to determine which part
should be deleted before inserting the next candidate.
progn is unnecessary in the else part.
Bind <backtab> to minibuffer-complete-backward rather than M-TAB.