Add arbitrary element support

This allows serializing elements other than forms.  Closes #4.