Move writeps.* into fileio/

Don't install the headers, as they are quite marginal functionality.
Also, clean up the header a bit (remove unused and undefined viewps())
and remove some unnecessary inclusions.  Add include guards to
types/matrix.h to make it possible to include it without the full
typedefs.h.

Change-Id: I8352cbe01cda56212be5b185af0fc7d21ca99b23