Remove obsolete code that referred to zsh history.

Use of HISTFILE and fc was refactored long ago.
Do not record selected directory in the index.

Let the scd caller take care of adding the match to the history.
Streamline options processing.

case statement was too complicated.  List option is now processed
at one place.  Removed unnecessary variables.
Use EXIT variable to exit or return.

Aliasing return=exit in a script would make it impossible
to jump out of a local function.  When scd is run as a script
EXIT=exit, if function, EXIT=return.
Move matching and ranking code to a local function.

Directory matching and ranking is now handled at a single location.