Revert "Revert "Several fixes for crawlability and other SEO related issues caused by the recent apptimizer upgrade.""

This reverts commit 586fcf8abe269394957179bb46437deac0241ad1.