Fix #1648

Several `json_encode()` functions were missing so added them and removed one double
`htmlspecialchars_uni()`.

https://github.com/mybb/mybb/issues/1648

BTW, is it just me or the `username_exists` action isn't used by
anything? I grepped the code and can't find any reference.