bash completion: add nbconvert and history subcmds
bash completion: generalize subcmd completer logic
bash completion: profile, history, locate cmds
bash completion: ipython <tab> shows only subcmds

If a partial filename, or an flag or option argument is invoked, those
completions will still take place, but by default, to aid the user in
the discovery of subcommands, pressing tab immediately after ipython
will list *only* the subcommands as possible completions
bash completion: subcmds get a trailing space

thanks to @juliantaylor for providing the patch
Merge pull request #4528 from ivanov/completion-update

improvements to bash completion