Made layer.fields.add() support adding an array of field definitions.