Optional *sn* when *barcode* filled

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