Load compinit before running the library scripts

This is necessary to enable setting completion stuff in library scripts.
Change history alias into a function

This commit changes the history alias into a function which puts
the passed arguments before `-l 1`. It also provides a temporary
workaround to the lack of a `history -c` command in zsh.

For more information see issues #739 and #789.
Simplify `if' into oneliner, allow spaces in HISTFILE
Organize history.zsh file and improve comments
Ensure builtin fc is used (see #3001)
Allow overriding -l flag in history
Rename fn_history() to history(), use \ to add specificity
Use zparseopts to get passed arguments
Merge branch 'run-compinit-first' into fix-history-alias-beta
Use `fc' completion for fn_history and history alias

Needs to have compinit loaded before lib/ files (check out
branch `run-compinit-first')
Merge branch 'fix-history-alias-beta' into dev