Fix several memory errors in error code paths in project.c
Make upload command simpler to use.

Reset after programming by default, and trigger reboot also by default.
ty upload --wait is the only alternative and will wait for the bootloader
to show up instead of triggering reboot.