prevent errors when listing broken memberships

If the other side of the membership has been deleted then skip over
listing the details to prevent errors.
we need to leave the li in place as otherwise the code that attaches
edit events to this, which currently doesn't know about the contents of
memberships, relies on them being there to assign id data correctly.

Fixes #405
correct image deletion post url

the POST action URL used on the image deletion form was incorrect
which meant images could not be deleted. Fix this by adding an image url
generating function rather than coding them by hand in the template.

Fixes #407 and #412
add correct classes for event attaching on org page

classes to allow edit and delete events to be correctly attached to
posts and memberships on the organization page
call destroy directly on posts model for deleting

Becuase posts are a separate model and not nested within the
organization we need to destroy them directly rather than removing them
from the nested collection and then rely on that cascading the save up
to the organization model. If we don't do this then no API call is made
and the post isn't deleted on the server.

Part of #406