Better require fallback.

No document.write hackery and increases the chance (essentially
guarantees) that require.js and bootstrap.js will be loaded concurrently.

It only works on optimized builds but that shouldn't be a big deal.
Add 404 cache.

This prevents a request for loading static pages.