Added @Column(unique=true) constraints to various name fields.

Fixed bug in which MetadataTemplate name fields were not required fields in the database.

Minor changes to the isInUse query in the AttributeDefinitionDAO.

Added a query which will obtain all AttributeInstances related to a given channel.

Added API endpoint for previously discussed query.