Don't segfault when erasing short option completions

When using `complete -s x -e`, the long option is unspecified, which
makes it NULL. Comparing this to a `wcstring` segfaults.

Fixes #1182.
Don't erase all long opts with `complete -e`

When using `complete -c foo -l bar -e`, all long options for the command
were being erased because it was also comparing the short option, which
was 0.
Don't erase old-style options with `complete -l foo -e`

When erasing long option completions, distinguish between gnu-style and
old-style options, just like we do when adding and printing completions.
Erase all completions with `complete -c foo -e`

When passing `-e` to `complete -c foo` without any other options, all
options for the command should be erased.

Fixes #380.
Add tests for the various `complete -e` changes