Add drag/drop-ability to groups; fix assets bug

Fix a bug from the previous assets conversion (canvas needs to use
"assets" dir, not "static").

For dragging and dropping groups, there was a conundrum with how to
refer to them.  The data structure of order of notes in a dotstorm model
looks like the following -- in this example, <id1> and <id2> are
ungrouped, and <id3> and <id4> are in a group:

    [ <id1>, <id2>, { 'ideas': [<id3>, <id4>] }]

Since groups have no ID, how do we refer to them?  We could do array
index position, but it seemed clearer to use a combination of the ID of
one of their notes, and a boolean indicating whether we were referring
to the group, or the individual note within the group.

This leads to the mildly ridiculous explosion of methods: putLeftOf,
putLeftOfGroup, putGroupLeftOf, and putGroupLeftOfGroup (as well as
'right' for all of those).  I added the combined "move" and "combine"
methods as well (the others alias to the combined methods), but it does
seem clearer to leave the multiple names.
Make names optional; reorganize frontend code.

Names are now optional -- slugs and names are properly distinguished.

Frontend code is now organized into distinct files, as frontend.coffee
was getting a little out of hand.
Replace requirements.txt with package.json
Switch to mocha for tests; update tests

Switch from jasmine to mocha as the testing framework to use.  Rework
`spec/canvas2image.spec.coffee` to work as a test.  Fix
ideacanvas2image.coffee::remove's missing callbacks.
Fix bug creating named dotstorms; Fix versions

Get connect-assets to the correct version (2.x).
Switch dev dependencies to mocha from jasmine
Start switching to mongoose for backend

Implement mongoose schema in lib/schema.coffee, and tests in
spec/mongoosedb.spec.coffee.  Modify lib/ideacanvas2image.coffee to use
the mongoose models instead of backbone models.  Shift the logic for
triggering generation and deletion of thumbnails into mongoose (it'll
need to be removed from the socket connector).

Still TODO: all the socket translation, cleaning up
assets/js/dotstorm/models.coffee to match the new schema, and some way
to migrate the existing mongo db to the new mongoosified schema.
DANGER this commit deletes files.. committing to protect while investigating
Fix data deletion bug with photo upload

When there was no `photoVersion` attribute of an Idea model, the path
given by `idea.getPhotoPath(size)` was evaluating to the base path --
namely, the root of the assets directory.  Then when we went to delete
the parent directory of the photo, we would clear files in the project
root!!  This is fixed now, with checks in place to ensure that the photo
URL is not null before returning a non-null path.
HUGE refactor. Data model backend changed.

 - dotstorm.ideas is now dotstorm.groups, and every note (even if not
   explicitly  grouped) is in a group.
 - mongoose pipe the whole way top down
 - reworked the note sorting/grouping code
 - testing frontend models with an eval hack in node
Massive changeset; switching to image-only display

Displaying layered text/canvas/photo was way too much hassle, especially
when we needed to start supporting additional outputs like embedding. So
now, backgrounds, text, drawings, and photos are all rendered directly
to a single image which is stored during save, and presented to the
user.  This ought to mean much simpler interfaces and embedding.

This commit also adds embedding templates, styles, and links.

Currently broken:
 - voting
 - tags
Update tests to reflect new api
Update 'Show Ideas' to use a consistent grid

Make it so that whether grouped or not, notes are displayed with
consistent spacing, preventing the masonry bricolage problem with floats
of differently-heighted elements.

This sort of styling is still needed for embeds.
Obsessive nudging of margin pixels in groups.

Could come back to bite if we did something in the future like change
the margins in the css file.
Nudge rendered text up 10 pixels
Remove console.log
Tag editing fixed.

'taglist' virtual may be a waste of time; guessing which of 'taglist' or
'tags' is current is confusing.  Will probably tear it out soon.
Irrationalize the grid.

It looks better to shorten the left/right margins a tad.  Take out the
margin squeeze hack for groups; but do show groups with narrower margins
internally.