New Nginx config to automatically append slash.

The Nginx config needs to handle 3 cases for serving files:

  1. /en/latest/file.html   -> Serve file.html
  2. /en/latest/            -> Serve index.html
  3. /en/latest             -> Redirect to /en/latest/ (append slash).

Previously, the Nginx config handled the first 2 cases, but didn't
handle the 3rd case very well. In that case, it served up the
index.html page without redirecting, which would break relative links
(See issue #644.)

This was due to my misunderstanding of how the index directive worked
with try_files. I thought that "try_files /translations/$uri/" would
do an internal lookup in the filesystem of the /translations/$uri/
directory, and try to serve the index.html page. However, what it really
does is send a redirect to http://readthedocs.org/translations/$uri/.

Needless to say, that URL breaks. To mimic the directory lookup, I had
added rules like this: "try_files /translations/$uri/index.html". But, even
though it served up the index page, this was pretty kludgy, and as mentioned
above, didn't properly append a slash and redirect.

The new Nginx configuration in this commit sets separate locations for
/translations and /single_version, uses a try_files directive that handles
all 3 cases above, and falls back to Django for any 404 (NOT FOUND) and 403
(FORBIDDEN) error.

Why fall back for 403 errors?

Because a URL like http://pip.readthedocs.org/en/ will cause Nginx to look
for /en/index.html. When that's not found, and Nginx doesn't have permission
to list the directory, it will return a 403. But, we would rather pass the
request to Django, so it can generate a redirect to
http://pip.readthedocs.org/en/latest/.

Fixes #644.
Remove special case for appending slash.

No longer need a special location directive for "/en/latest$", since
appending slash and redirecting will now be handled for all directories.
Keep @fallback consistent.

Set "proxy_buffering off" for @fallback for CNAMEs, just like it's
set for the other @fallback location directives.
Add append slash test to nginx-smoke-test.py.
Fix error_page directives for CNAMEs.

They should be consistent with the subdomain ones.
Merge pull request #691 from rtfd/issue-644-nginx-fix-trailing-slash

Issue 644 nginx fix trailing slash