status/detail - ajax style loading of log history

This will make loading of status/detail to be faster.

This patch moves all server-side log coding to a seperate
"snippet" function.

Client side the javascript will use load() method to load html
directly into the div.