MFC r266915: MFV 266913+266914:

3897 zfs filesystem and snapshot limits (fix leak)
4901 zfs filesystem/snapshot limit leaks

Approved by:	re (gjb)

(cherry picked from commit 1cdd80eb2cabb960055dba25fae3844797004e2c)