Fix tab completion for branches with a dot

Completion after the dot would be seen as a new branch name. This is correct
behaviour for two dots (e.g. HEAD~2..master) but not for one dot (e.g.
fix-v1.4)
Refactor completer spec.

There was a lot of repeated setup code.
Move tab dot completion spec to units.

The integration spec was a bit too specific, a unit spec is faster.