[ticket/10986] message.id fallback to SERVER_NAME or phpbb.generated

Rather than send invalid message ids with a missing domain part we try
to read one from $_SERVER and otherwise use phpbb.generated

http://tracker.phpbb.com/browse/PHPBB3-10986