[WIP] Unified rendering

This is a fix for https://github.com/scrapinghub/splash/issues/110 + cleanups. It is work in progress.