Add weight field to Story model

Add a ``weight`` field to the ``Story`` model to allow for sorting by
a generated value.  This is implemented by making ``Story`` inherit from a
new abstract model class, ``WeightedModel``.

``WeightedModel`` provides a ``get_weight`` method that is overridden to
return the current weight value.  In the case of ``Story``, this is the
``published`` date/timestamp as an epoch.

The weight field allows for sorting stories by its published date/time while
taking into account the published date/time of connected stories. This
implementation uses signals to set the weight field to either the date the
story was published, or the date of the most recently published connected
story.

Addresses #625
Sort lates * on homepage by published date

Sort the latest stories, projects and organization lists on the homepage
by published date/time instead of last updated date/time.

This gets around the problem of the latest lists being changed when an
item's ``on_homepage`` flag is changed.  For stories, the ``weight``
field is used instead of ``published`` so the sorting can reflect connected
stories as well.

Addresses #625
Additional tests for #625

Adds a test for the specific behavior described in #625. This checks that
toggling a story's ``on_homepage`` flag doesn't affect the lates stories
list.
Sort projects by published date

In the Project list view, sort the projects in reverse chronological order
by their published date/timestamp instead of the last-edited date/timestamp.

This avoids the issue described in #625 where the toggling the ``on_homepage``
field updates the ``last_edited`` field and changes the sort order.
Hack to deal with race condition in test

This test passes without modification when run with sqllite but needs the
sleep to pass with postgres. I'm not too worried about the race condition
in production because the space between writes IRL is likely to be seconds,
not milliseconds.

Addresses #625
Increased sleep to deal with race condition

I couldn't get this to fail consistently on my test workstation to debug
further.  Increasing the delay for now.

Addresses #625
Don't include compiled CSS in DEBUG mode
Correctly set height and width of section list

Set the height and width of the section list factoring in the spacers. I
think that this wasn't adjusted when the design was updated to always show
the spacers.  So, when there are enough sections, the width of the element
won't be wide enough to contain all the sections and the element's height
grows.

Closes #656
Merge in fix for #556

Merge branch 'hotfix-688-scroll_bar_not_working' into develop

Conflicts:
	README.rst
Fix failing test

So this wasn't a race condition, just some silliness on my part. The story
saves were happening in within less than one second of each other, so when
they were converted to an epoch by get_weight and converted to an integer
for storing in the weight field (an IntegerField), the weight values are
the same. If the comparisons were <= instead of <, the tests would pass,
but since the comparisons used <, they were failing.

I don't think having duplicate weight values for closely published stories
is a problem at all, but I feel like this test should reflect the case
where stories are written in a specific order and have distinctly different
weights.  I updated the call to sleep to ensure that the saves occur at
least one second apart.

Addresses #625
Fix regression related to #556

Newly created, unsaved stories had their section list rendered incorrectly
since the width was based on the spacer width.  When a story is unsaved,
no spacers are shown.  This sets a default spacer width so the calcualtion
works whether or not the story is saved.
Merge branch 'hotfix-556-section_list_on_two_rows' into develop

Conflicts:
	README.rst
Detect logged-in user correctly

self.request.user will always evaluate to True.  To check if a user is
authenticated, I need to use self.request.user.is_authenticated().

Closes #690
Merge branch 'hotfix-690-request_user_evaluation' into develop

Conflicts:
	README.rst
Pass JavaScript error details using extra

Instead of serializing the additional JavaScript error data into the error
message, pass it to the logger using the ``extra`` keyword argument.  This
makes the error message clearer but still allows the additional information
(URL of script or view where error occured, line number in script or page,
username, browser location where script that triggered error is included)
to be visible to certain handlers.  In particular, the Sentry handler
displays the extra parameters (and other info) quite nicely in the
Sentry panel.
Return new cache value

In ``Story.get_related_list`` return the new value after setting it in the
cache.  Before, there was a bug where it would only return a value if it
was found in the cache, but not if it had to first set the value in the
cache.

Addresses #566
Merge branch 'hotfix-566-lost_metadata' into develop

Conflicts:
	README.rst
	apps/storybase_story/tests.py
Refactor story creation steps

Create a common function that gets or creates a story with variable extra
keyword parameters.  Then call this from the various step functions. This
eliminates some repeated code.
Add spec for #625

Add a lettuce feature specification testing the functionality for #625.
I didn't actually implement the steps for the feature/scenario, but this is
still a good way to plan and document my manual testing.
Use ugettext instead of ugettext lazy

Inside ``storybase.utils.get_language_name`` use ugettext instead of
ugettext lazy since, in this context, we want to translate when the function
is called instead of when the string is evaluated.

Also add a unit test for get_language_name