Replace number field with more traditional input field
Remove ReferenceField and ReferenceManyField

These are just particular cases of ChoiceField and ChoicesField. By
tweaking the Reference class just a lottle bit, we can avoid a lot of
code duplication and make the code simpler.