Add -P back to `destroy`
Create TrimToDate function

Comes with tests.

Removes one sed call
Create TrimToTTL function

Comes with tests.

This unfixes bug fix 2) in 5d1c600279f6c9878aeb1194fc72088638a4362d
but it will be refixed again in a later patch.
Create TrimToSnapshotName function

Comes with tests
Create TrimToPrefix Function

Comes with tests.

Will be used by ValidSnapshotName in a later patch
Create ValidPrefix function

Comes with tests.

Will be used in ValidSnapshotName in a later commit.
Create TrimToFileSystem function

Will be used in a later commit.
Create ValidSnapshotName function

Comes with tests.
Create TrimToPool function

Comes with tests
Create ItRetvals test-spec
Use $RETVAL rather than printf

This allows us to avoid spawning a 12 metric-shit-tonnes of subshells.

These are the stats from my test-environment:

Before the introduction of Trim* functions:
    average time = 1.05s
    subshells = ~600

Post Trim* functions; pre-RETVAL:
    average time = 7.5s
    subshells = ~38,000

Post RETVAL:
    average time = 0.86s
    subshells = ~400
Make Trim* functions validate rather than guess
Use "local" for variables inside of functions

While not part of POSIX, "local" seems to be supported in most semi-modern bourne shells.

FreeBSD's sh and dash both support it. Solaris supports it going
back to at least Solaris 9 (ZFS was introduced with Solaris 10).

Thus, I believe local is quite portable and the benefits are
significant.
Create PoolExists function

Comes with tests
TrimToPool now validates pools with PoolExists

Updates tests
Fix a bug with recursive deleting
Have ItRetvals Test also check return num
Fix TrimToDate bug with empty string
Update comments to reflect co-RETVAL/return situation