Added an error state.  If rendering errors out, we don't go to the ready state, but to the error state instead.
Added a getStats method.
When rendering a widget, catch any rendering errors and clean up the dom pool on error so we don't orphan a dom resource.
New
Merge pull request #288 from skrenek/master

Render error handling