Change the code to use the openpty(3) API which uses the pts(4) driver
instead of the pty(4) driver.

PR:		184597
Submitted by:	tobias.rehbein
MFC after:	2 weeks