runtime: Flush stdout/stderr before close

Add an explicit flush() StandardOutputPort before we close the Unix file
descriptor. There is no way for the buffered output to be written once
we close the fd.
runtime: Move close implementation to AbstractPort

Port closing is also needed by (call-with-port) and related procedures.

- Introduce AbstractPort::closePort() that has a default implementation
  calling closeInputPort() and closeOutputPort()

- Change lliby_close_port to call AbstractPort::closePort()
compiler: Rework convertibility to <unit>

Having all types satisfy the unit type was too aggressive of a change.
For example, ((make-predicate <unit>) val) always returns true.

- Make SatisfiesType only consider <unit> to satisfy <unit>

- Introduce ConvertibleToType which considers all types convertible to
  <unit> but otherwise works the same as SatsifiesType

- Introduce ConvertibleToReturnType which will determine if one return
  type satisfies another. This considers all return types convertible to
  SingleValue(UnitType)

- Update IntermediateValue.castToSchemeType use ConvertibleToType
  instead of SatisfiesType. This allows (cast) and (ann) to <unit> to
  work

- Update PlanLambda to use ConvertibleToReturnType to determine a
  lambda's return type

- Restore old pointer compare fast path for <unit> type

- Change "make-vector" to actually use the stable type it calculates for
  the new vector. This is an unrelated bug that was masked due to any
  vector being satisfied by a vector of the same size containing <unit>
  (!)
stdlib: Implement output string ports

- Add BufferOutputPort port implementation that uses a ostringstream to
  accumulate its output. This will also by used by output bytevector
  ports

- Add StringOutputPort implementation that adds an outputToStringCell()
  function on top of BufferOutputPort

- Expose StringOutputPort via (open-output-string) and
  (get-output-string)

- Move existing functional tests for output ports to use a temporary
  (output-string-port) instead of standard out or standard error. The
  existing tests were fragile as the test framework uses both stdout and
  stderr internally.
runtime: Make port stream accessors non-const

The returned stream can be used to modify the state of the port by e.g.
consuming our outputting data. Conceptually they shouldn't be const.
stdlib: Implement output bytevector ports

This reuses the BufferOutputPort infrastructure from string output
ports.
stdlib: Implement (open-input-{bytevector,string})

These are untested as none of the input procedures are implemented.
However, this is a prerequisite for testing those procedures.
stdlib: Clean up InputOutputSuite

- Use lowercase test names for consistency

- Fix whitespace
stdlib: End-of-file object support

This is an alias for #!unit at the moment. As we don't support the read
library to parse arbitrary Scheme values this is safe - none of the
other input procedures can return #!unit normally.
runtime: Implement (read-u8), (peek-u8)

These read or peek raw bytes from an input port. They correspond
directly to istream::get() and istream::peek()