script: Inline some hot functions used in flow constructions.

9% improvement in style recalc on the rainbow page.
Added refs to Element's DOM spec

This is a sub-task for #1660.
Added refs to live HTMLCollections issue
Fixed FIXME message as pointed out by jdm
Rename starts_*_flow to is_*_flow
Change <em> and <strong> to be HTMLElement (fixes #1704)
Refactor cascade() and fix cascade_with_cached_declarations()

* Expand the apply() and apply_cached() templates.
  Their two invocations each were different enough
  that this improves readability IMO.
* Create computed::Context from inherited and cascaded values
  rather than computed value, as much as possible.
* Centralize this creation rather than making it per-property,
  making 'needed_for_context' not needed anymore.
* Pass a context to cascade_with_cached_declarations() rather than
  duplicate the creation code.
Ensure id attributes on elements only affect elements present in a document.
Add background-image property
De-@mut pipeline
Impl background-image support.
Add background test file
Add a reftest for background-image
Support base_url in stylesheet
Reduce code duplication in CSS parsing by passing base_url everywhere.
Add a test for the base URL of external stylesheets.
box: Use macros to reduce code duplication
Always use the border-box for Box.position.size

Fixes #1674.
reftest: Allow free-form comments
Add a reftest for #1674