Tags: Initial commit.

Tags can now be added to projects.  Tags consist of
a "Tag Entity", which has the actual definition of the tag
such as { type, name }.

Tags themselves are just mappings between the Tag entities
and the projects or tasks.  A tag looks like this:
{
  projectId: x,
  tagId: y
}

Tag Entities can only be manipulated by admins using the
standard CRUD functions at the /tagentity end point.

Tags can be manipulated by anyone that owns that project,
at the /tag end point.

Important endpoints:

/tag/* -- standard CRUD endpoints
/tag/add -- adds a new tag entity
/tag -- disabled so you can't list all tag mappings
/tag/findAllByProjectId/:id -- list all the tags for a given projectId
  This end point will also look up and return the tag entities.

An initial set of test cases is included.
Update autocomplete to provide tags

Need autocomplete controller to return tag info, so we
can use it to add tags to projects with select2.
UI framework for tags using select2

This is an initial commit for adding a select2 box to pick tags
for a project.  select2 has been added as a reference to the main
repo via submodule.  require_config.js has been updated to
import select2, which is NOT an AMD module (thus the added shim).

The framework is in place to search for tags, but as commented,
the handler functions in the controller are not yet implement.
Nor are any custom render functions for the select2 results.
Add modal footer; scaffold for tag modal

The tag modal allows an owner/admin to create a new tag.
This commit just adds the scaffold for showing the form,
but does not implement the logic on submit.

Modals could not have a modal-footer part of their templates,
so instead put in a modal-template div and attach the rendered
form to that item so that both modal-body and modal-footer
can be defined.  There's probably a better way to do this,
but this is a quick fix.
Implement tag create; update tag selector

The popup modal for tags now creates the tag in the
backend and passes the created object back to the view.

The view listens to that event, and updates the tags
selected in the box, including previous tags and the
new tag.
Fix edge case where no tags exists

When no tags were defined yet, the controller wouldn't respond
or run the async tag lookup.  This made the endpoint hang.

Fix by adding in error and return value checks.
bug in tag.findAll... use tagId, not id

Using tags[i].id lead to looking up the wrong tag
entity.  Instead, use tag[i].tagId to look up the
correct reference in the entity table.

Also fix the return statement to be outside
the for loop
Allow other fields to be included on AC

When returning autocomplete results, there may be additional
types that are needed to render the results.

Add a new option `include` which is simply a list of fields
to include in the result set.
Functional adding of tags and dynamic render

Add a new template for rendering tag contents, and
then allow created or selected tags to be stored on the
backend and rendered in the appropriate tag type.

Add a new 'tag' backbone component to store configuration
for tags.  Since tag names, types, etc are mainly a
end-user customer choice, let them decide which tags
are there by editing the tag.js component in backbone.
The backend doesn't need to know anything about the
type or content of tags, it just provides the machinery
for the front end.

Add new items to require, and add the async module
so that we can do multiple calls and then return
on their completion.
Merge event changes with tag changes

New tags implementation has diverged from the main
sprint5 branch, so needed to make minor edits to events.

Most notably:
- modals get attached to modal-template now, so can
specify both body and footer.

Merge branch 'sprint5' of github.com:Innovation-Toolkit/midas
into sprint5
Tag delete - remove tag if admin

A little "x" shows up next to each tag, and clicking on it
removes the tag from the database by calling the
DELETE http action and then removes the <li> from the
DOM.