Don't stop listening for events when AssertError is raised (closes #974).

The reason why the game was in a broken state some days ago was that one of
the notification callbacks modified the 'modified' flag of the game it listened
for events to, which is forbidden. There is an assertion in place to enforce that.

Unfortunately, if the assertion was raised, the service didn't re-attach the
listen callback to the game, causing the listen "loop" to break. This led to the
service not being notified when that game was destroyed, so that it failed to
be deleted from the service.games hash, causing the avalanche of errors that
we saw in production.

While it is essential that we know when one of the notification callbacks modifies
the game even though it shouldn't, the service should try to go on (while logging the error)
and not just get itself into a broken state. That's what this commit is trying
to achieve.
Add the FB loading code to static/index.html.

Otherwise the game would be throwing errors complaining
FB variable was undefined when trying to play without django.
Don't break on nonexisting game_ids (closes #977).

The tabs code was broken when a request with a nonexisting game_id
was made to the service. Instead of showing the 'Game does not exist'
dialog to the player, the game would error out, and what's worse,
the game would keep erroring for that player even if he tried to visit
an existing game (or create a new one), because the faulty game_id
was already stored and associated with the player in the tabs table.

This commit prevents nonexisting game_ids from getting into the tabs table.

It also includes a migration that deletes all rows from the tabs table
that hold a game_id that refers to a game that doesn't exist.
Fix a typo in a comment.
Don't close advertise before 2 players join (refs #967)

Don't allow the user to close the invitation box before 2 more players
join the game.

I also fixed a bug where the tests would fail if the FB sdk wasn't
defined.
Implements new advertise design (refs #970)

This implements the new advertise design, as well as the NEXT button and
an as-of-yet inactive "enable bots" checkbox.
Inhibit bots by default (refs #968)

With this, bots never join a game unless the master checks the "allow
bots to join" box.  If the owner unchecks it and some bots have already
joined, they should behave normally, but further bots will not join.

Implementation details:

* The server-side plugin was altered to preprocess requests, so it needs
  to be listed on the command line accordingly (pluging README altered
  accordingly).
* Since the bot is a server-side plugin, I created a matching client-side one.
* The default bot.xml was changed to speed up bot joining, so it also
  needs to be updated in production.
Merge branch 'master' of git://gitorious.org/~antoviaque/cardstories/antoviaques-cardstories
Send daily email conditionally as per #942 (closes #942).

The conditions are sligthly different from those stated on #942,
because they were eaiser to implement - the email is always sent
if player was last active exactly 30, 60, 90... days ago (without trying
to match up dates as described in the ticket).
Don't send out blank emails (closes #981).

If the player was active not long ago before doing the email sending,
and there is no new info for him to be emailed about, make sure
that the email isn't sent.

We already have a 'should_send_email' function so it would be nice if
this additional check could be added to it, but the idea was if we already know
we don't want to send the email from other conditions, we dan't want to
go fetching everything about the player from the db, and this additinal
check can only be made after everything has already been fetched from the db,
so I kept it separate from 'should_send_email'.
Make it possible to only send emails to specified recipients (closes #982).

The loop function takes an additional optional email_list parameter,
which when present, acts as a filter to only allow sending email
to emails present in the list.

When invoking the loop.py script from the shell directly, path to a file
containing newline separated emails can be given as the last argument.
Fix invite dialog layout in FF on OSX (closes #979).

It took me a while to realize why the three inner elements didn't want
to line up (the last one was pushed down to the next row), even though
the widths of the inner elements seemed to have been correctly set to
not exceed the width of the parent.
While I could have simply reduced the widths of the inner elements,
I wanted to understand what was happening.

It turned out the problem was that the three divs are displayed as
'inline-block', which preserves spaces between elements, if spaces are
present in the HTML source. So between the three elements there were
spaces, taking up extra horizontal space.

I found this website which lists a couple of tricks about how to get rid
of the whitespace between inline-block elements:

http://css-tricks.com/fighting-the-space-between-inline-block-elements/

I chose the most straightforward method - removing whitespace between
elements in the HTML source itself.
Merge branch 'master' of git://gitorious.org/cardstories-mtyaka/cardstories