Assorted fixes

* Fixed `round_to_str` function (Ranking server details): When `ndigits` was `undefined`, the function failed and cut all the trailing zeros in the number. This was because the `ndigits == 0` condition wasn't verified when `ndigits` = `undefined`, so the resulting number from `toFixed()` had no decimal part, and the regular expression cut all the zeros in the integer part.
* Fixed time handling in CWS: No more negative time when contest ends or starts! And the `countdown` is now relative to the `server_time` and not to the local time (`now`).