Rename unstable branch from 'dev' to 'unstable'

You have to agree with @shaladi, that it makes much more sense to call the
unstable branch 'unstable' than 'dev'.
Merge pull request #3 from alexkonradi/master

Rename unstable branch from 'dev' to 'unstable'
Add several model class definitions & migrations

Add NewPostEmail, ClaimedItemEmail, EmailThread, and Item to models.py,
along with the database migration (0002) to support these classes. This
should allow work to be done on the public API based off of these models.

In addition, this commit restructures the test package for the web_api
Django app, and adds a modest set of unit tests for the afforementioned
model classes.
Add modified field to EmailThread

The save() methods on Item, NewPostEmail, and ClaimedItemEmail have been
overriden to automatically update the EmailThread.modified field. In terms
of efficiency, this makes more sense than having a property on EmailThread
(implemented by overriding __getatr__) that pulls the values of the
associated Item, NewPostEmail, and ClaimedEmail objects. The reasoning
here is that the field will be read much more often than written, so
making it usable in an SQL query condition is more important than
preventing a little bit of data duplication.
Add web_api.EmailParser class for parsing emails

The EmailParser class is responsible for turning incoming text into a set
of meaningful fields, namely who the email is from, what the subject is,
and what the body is. Since not all messages are pure text, this turns out
to be non-trivial.
Bug fix in test case for NewPostEmail
Fix settings.py to use the correct databases

There was a bug in using "is" instead of "==" to compare hostnames, and
using next() on a list instead of an iterator.
Merge branch 'unstable' of https://github.com/ARmadillo-reuse/api-server
Fix permission error when checking branch

Use the directory name instead of calling out to git to determine whether to
select the stable or unstable database.
Move EmailParser to web_api.processing package
Add reply and signature removal to EmailParser

Both of these capabilities are pretty basic; they just look for patterns
and use those to remove chunks of messages. Signatures are identified
either by a line of dashes or similar, or, failing that, by a set of
simple heuristics that appear to work fairly well. The test suite was
expanded to include test cases for these specific features.
Rename EmailParser as EmailPreProcessor
Fix bug in EmailPreProcessor

Certain messages were causing infinite recursion, which is bad. The error
was caused by assuming that all paths through
EmailPreProcessor#strip_reply either reduced the amount of text or
returned (one of them didn't).
Add EmailParser, implement parse_email_thread
Add thread detection to EmailParser

It currently uses just the subject, and returns an EmailThread object if
one is found, or None otherwise.