core: make more robust against illegal page paths from hacking attempts.
core: the hostname can be 'null', handle it as 'undefined'
core: smtp: use os:timestamp() instead of now(). Added guards and more strict tests for inc_timestamp/sent handling