Fix friends page to work with remote friends

Major changes:

    author/models:
        - getFriends, getPendingSentRequests, and
          getPendingReceivedRequests now return a dictionary with
          keys "local" and "remote", each containing a list of authors.

        - added RemoteAuthor, a foreign key to ReomteRelationship
            - this was needed to store information about remote authors
              other than their GUID (such as url and displayname, so
              they could be properly displayed on our local pages)

    RESTful API for friend stuff now work properly with GUIDs

    unit tests were updated to test for remote authors
Merge branch 'master' of https://github.com/awwong1/CMPUT410-Project into rest_post
saving a post using ajax put works, except for images. displaying it in html will be next
finished writing part that adds post to html
dynamically adding post from put half working...
Fix post retrieval regression

The change to getFriends' returned data structure broke the function that pulls what posts
can be seen.  I'm just pushing this now so everybody can get back to work while I fix the
SERVERONLY issue.
Forcing the login and registration pages to send a CSRF cookie

I'm still getting #37 sporadically.  It usually occurs on a "cold start" of the server,
with the DB nuked and me registering new users.
Attempt at #37, SERVERONLY permission fixed, stream works as intended

So #37 is an elusive one.  The last commit did not work.  I've gone and changed render()
calls to render_to_response(), as render_to_response() seems to be a helper function that
does more things behind the scenes than render().

SERVERONLY now is considered "Dogenode friends only", so users can only see posts marked as
SERVERONLY if they are locally friends with the posts' authors.

The stream used to show all public posts, but that defeats the purpose of following someone.
So, the only public posts the stream will display are the ones made by those a user is
following.
Fixed docs.min.js 404 error

- commented out referential script tag, replaced with static url
- grabbed js file from bootstrap source
Merge branch 'master' of https://github.com/awwong1/CMPUT410-Project
Add POST to remote server for friend/unfriend

Also fixed api unit test that failed because of list order
moved postbuilding functions in api views to utils,py, ajax put mostly working (except images still), and wierd error with categories not being defined
Merge branch 'rest_post' of https://github.com/awwong1/CMPUT410-Project into rest_post
moved postbuilding functions in api views to utils,py, ajax put mostly working (except images still), and wierd error with categories not being defined