boss_session: mnesia initialization improved;

When the `session_adapter` is set to `mnesia`, the Mnesia
schema was not created automatically. This is to fix it
by adding the `ensure_schema` function.

Note that it has not been tested in distributed environment
yet so we expect the `ensure_schema` may become a bit more
complex in the future.

Additionaly, the timeout for `wait_for_tables` was
increased from 20ms to 1000ms because 20 was not enough
at least in our testing environment.
Pass a new _req template variable

Provide all the templates with a new `_req` variable
that holds the original web request so that template
can use query and post params directly.

There are situations where it is much more straightforward
than to pass the specific parameters via controller
all the time again and again, across the whole application.
Merge pull request #333 from ztmr/ztmr/dtl_req_var

Pass a new _req template variable
Fix before_ -> 'ok' in Elixir controllers
Fix {ok, ...} return values from before_
Merge remote-tracking branch 'github/ztmr/mnesia_cache'