Refactor port configuration code.
Get Xon/Xoff status on Windows.
Make sure OS handles are set correctly for unopened / closed ports.
Tidy up static functions.
Remove sp_ prefix from private port data structure.
Additional argument checking for config functions.