Clean shutdown of custom meterpreter executables on migrate and exit

Change `thread_kill` calls for exit and migrate to `thread_sigterm`. This makes the application shut down cleanly when exiting or migrating to another process. Changes are `#ifdef`ed to `_WIN32` so they have no impact on the POSIX version.

- [ ] Exits cleanly after `exit`
- [ ] Exits cleanly after `migrate`.
- [ ] Process exits cleanly without extra channels open.
- [ ] Process exits cleanly _with_ extra channels open (eg. port forwards).
- [ ] Works with `reverse_tcp`. (The `*_http`, `*_https` are suffering from another problem.)
- [ ] Works as x86 on x86.
- [ ] Works as x86 on x64.
- [ ] Works as x64 on x64.
- [ ] Works on Windows < 7 (eg XP and Vista).
- [ ] Works on Windows >= 7 (eg 7 and 8).