RPC as async application, limit status connections

Previously a new RPC thread would be created for each incoming
connection since in the main loop this application which was supposed to
be asynchronous was started as a synchronous application. Now it is
started properly and explicitly loads the session since they are not
loaded by default in an async app.

Limit the number of connections allowed to monitor a specific form to
one. Only one person should ever be waiting on a form, so quickly end
the connection if one already exists. This way an attacker can't just
create a few million requests wasting server memory and processing time.

Also fixed a signal initialized issue and moved srand initialization to
main instead of in each RPC thread.