Fix ZFS deadlock when sending a snapshot which is mounted.

MFC after:	1 week
Sponsored by:	Multiplay
Remove registration of C++ test programs into PROGS.

C++ programs need to be added to PROGS_CXX, not PROGS, and the code was
actually doing both.  Just keep the registration into PROGS_CXX to
prevent possible obscure build problems.

Approved by:	rpaulo (mentor)
Fix the build of plain test programs.

SRCS.<prog> must be explicitly defined when using the PROGS* functionality
for each program to be built.

As there are no plain test programs in the system yet, this was not
detected.

Approved by:	rpaulo (mentor)
Add some sample test programs.

This change adds some sample test cases to share/examples/tests/
demonstrating the basic usage of the atf and plain interfaces.

These test programs are fully-functional and are installed as part
of the test suite, which guarantees that the sample code remains
correct.  However, they currently mostly serve as a placeholder for
additional examples and may be incomplete (depending on how you
look at them).  I will see what else can be useful while working on
documentation.

As a bonus, the addition of these tests exercise the *.test.mk files,
one of which (plain.test.mk) was not yet in use, and also demonstrates
that it's possible to mix different kinds of test programs into the
same test suite.

Approved by:	rpaulo (mentor)