Optional *sn* when *barcode* filled

*Sn* field is optional if *barcode* field is filled in *add-device* view.
Fixed and refactored multivalue test.
Improved docstring for MultilineField.