added function to read server param from mg_server

this is very useful when combining it with mg_start_thread, as only a mg_server object is usually passed