Fix relative path URL bugs in the plugin API.

Fixes plugin-related 404 URLs, as well as the plugin directory URL
for installations which use a relative path.
Add relative_path to authentication redirects
Fix typo
Also add relative_path to destination

Because the destination url does not include the relative_path
closed #1653 -- removed that spinner thing npm uses now.
Merge branch 'master' of github.com:Fastinyoh/NodeBB into Fastinyoh-master
Merge pull request #1648 from char101/patch-1

Add relative_path to authentication redirects
latest translations and fallbacks
filter:templates.get_virtual for ajaxifying to virtual templates
closes #450

backup database before upgrade!
upgrade script will take the first post of each topic and set the
`mainPid` property on the topic. then it will remove that pid from the
sorted sets for that topic, this was done to make alternative sorting
work.

added a new sorted set called `tid:<id>:posts:votes` that is used to
sort topic posts by vote count, the original sorted set `tid:<id>:posts`
is used to sort by oldest first or newest first.

the main post is added to the returned posts array on topic load and is
always at the top.
theme changes are minimal just a few new data properties on the posts
and the sorting dropdown.
hopefully didn't miss anything too critical.
remove main post if page is greater than 1

this fixes pagination after the main post change
fixes posttools.ismain
fixes removePostFromTopic

remove the pid from the votes set too
closes #1655
callback
copyright
Fix removeRelativePath

Instead of checking the existence of relative_path (without /) anywhere on the url, it really should check that the url only starts with the relative_path.

Example

```
relative_path = /forum
without / = forum
url = /category/forum/5
removeRelativePath = ory/forum/5
```
Merge pull request #1658 from char101/patch-4

Fix removeRelativePath
use removeRelativePath in app.js too
removeRelativePath public