makefs/zfs: Add a helper function for adding ZAP entries
Some ZAPs are used to represent sets, in which keys and values are the
same. Add a helper function for this case. No functional change
intended.
MFC after: 1 week
(cherry picked from commit be2f92a96b96149fccb4ec9e9f9c42ee29b455e6)