Set message timestamp to time received by server instead of broadcast time to fix duplicate message reception. This won't fix legacy messages with wrong timestamp from duplicating, but that can be fixed by sending a more recent message to the client. Other changes just some code cleanup.