Validate gift membership purchase fields

This patch checks whether the number of purchased memberships is an
integer, that at least one membership of some type is selected, and that
there are no more than 10 memberships (of a given type) being purchased
at any time.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#   (use "git push" to publish your local commits)
#
# Changes to be committed:
#	modified:   giftmemberships.php
#
# Changes not staged for commit:
#	modified:   giftmemberships.php
#
# Untracked files:
#	giftmemberships.php~
#
