core: For compiling Zotonic files, also use platform defines.

(cherry picked from commit 043eaacce34e13bcf0b9bc91ee6f47652f1c24cc)
mod_base: Allow setting response headers in WebSocket response

...by initializing the response headers. Used for cookies etc. (e.g. for
logoff over a postback).
mod_base: Fix race condition in stream start

This caused the stream to start only 5 seconds after the page was loaded
instead of immediately after a 'session ok' message was received.
mod_base: Prevent duplicated start of WebSocket
mod_development: Load modules after recompilation
core: Include z_transport stack trace as separate lager log message
core: Always normalize rsc blocks

So also from non-post forms (e.g. manage_schema calls).
This allows for referencing resources in blocks by name rather than by
ID. `m_rsc:update` will change the name to an id.

(cherry picked from commit 49c6937cedb312a29c23680d9851e4ba7edd3b15)
z_transport: Call session_invalid via currently registered delegate
Fix lager error message.
Refactor session/page-process checks. Signal pages if user changes. Issue #816
Refactor edge-change notifications. Issue #818
mqtt: change the rsc update topic to '/rsc/<id>'. Fix access control checks, give priority to installed ACL modules before falling back to the z_mqtt_acl default rules.
transport: catch situation where session stopped during page/session setup. Issue #816
core: stop comet if websocket attaches. Issue #816:
core: prevent session check popups while redirecting after logon authentication. Issue #816
install: Postgres 8.x fix. It can't handle vars named like existing tables
core: Make the reload page functionality pluggable via delegate
core: (auth/page-status) fix for race-condition when reloading a page when the user authenticated or de-authenticatd.
Also transport a new page-id to the user-agent after authentication, this can be used for subsequent requests. Issue #816
core: add option to return the current page_id
core: replace tabs with spaces. Remove temp 'z_start_spinner();'