Implement FIODTYPE for master ptys.

Requested and reviewed by:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week