Reset optind to 0
POSIX states that setting this to 0 is unspecified however setting it
to 1 is causing issues on certain versions of glibc.
builtin: minor adjustements
* Fix usage strings
* Remove trailing whitespace
* Remove implicit long to int conversion
* Check errno when calling strtol
builtin: fail on invalid options and accept "--"
builtin: fix various issues found by static analysis
builtin/cd: fix segfault when PWD is not set
builtin/cd: fix a bunch of use-after-free
Implement `cd` builtin
POSIX `-L` and `-P` options are not yet implemented at this point.