ref: job-control mrsh/shell d---------
wip: job control
Initialize file descriptors
Implement case clause
Remove context.{stdin,stdout}_fileno

These we too fragile, nesting wasn't properly supported.

Instead, we now use dup() to setup and restore stdin and stdout in pipelines.
Add support for IO redirections in builtins
builtin: implement `unset -f`
Do not use shm_open for command substitution

Use pipes instead. This has the drawback of blocking the shell while reading.

Fixes https://github.com/emersion/mrsh/issues/57
Stop using shm_open for here-documents

Use pipes instead.

See https://github.com/emersion/mrsh/issues/57
Move away from FILE

Fixes https://github.com/emersion/mrsh/issues/58
Close FILE structs after forking

Fixes https://github.com/emersion/mrsh/issues/48
Make sure to close redir FDs before exec
Set CLOEXEC on all opened FDs
Add assertion to make GCC happy
shell: make AST const, fix memory leaks
shell: split task_command
Don't leak functions on shell exit
shell: pop args on function fatal error
shell: unify args_destroy
Implement arg stack for functions
Initial implementation of functions

Still to come:

- I/O redirection
- Pushing argv/argc
- return