Import v2.0.0 vendor code.
Merge branch 'vendor' to get 2.0.0 code.

Conflicts:
	configure
Import v2.1.0 vendor code.
Merge branch 'vendor' to get 2.1.0 code.

Conflicts:
	util/qemu-openpty.c
Apply changes from HaikuPorts in more portable way.

Original changes by Jerome Duval.
Port input handling to new API in >= 2.0.0.