Add implementations of getopt_long() and getopt_long_only()
There could be impacts to getop() since that implementation is shared withe new getopts_long() and getops_long_only() implementation.
Tested using a modified version of sim:nsh
getopt() in the FLAT build environment is not thread safe. This is because global variables that are process-specific in Unix are truly global in the FLAT build. Moving the getopt() variables into TLS resolves this issue.
No side-effects are expected other than to getopt()
Tested with sim:nsh