IP address validation added to link regex

link regex will now only match a valid ipv4 address

Also did some cleanup to the regex' replace callback and grouping.
cleanup ipaddress handling
chat: handle nsfw tag for links by adding the "nsfw-link" class to the links
modify the weight of emotes in the autocomplete so that they get selected before someone who never spoke
small cleanup to the linkregex, no need for separate variable for the classes anymore
bump version and update minified files