Refactoring: Simplify DocumentWriter by reorganizing its lifetime.

This change simplifies DocumentWriter by

1. Letting its lifetime match to the actual "writing" process:
   It is now created when actual data is arrived to be parsed,
   and is discarded once all the data is loaded.
   Then we no longer neeed DocumentWriter::m_state.

2. Moving most of its Frame dependency to DocumentLoader.
   DocumentWriter::begin() is factored to DocumentLoader::createWriter(), and
   DocumentWriter::replaceDocument is factored to DocumentLoader::replaceDocument()
   and DocumentWriter::appendReplacingData(). DocumentWriter::m_frame is now
   able to be replaced by DocumentWriter::m_documnet. This narrows the dependency surface.
   (Also it makes more sense because it is "document" writer after all.)

3. Making TextResourceDecoderBuilder an immutable object by stripping
   its setters out.

Note that (2) and (3) become possible because of (1).

Key observations here are that

- DocumentWriter had longer lifetime just because it stored mimetype and encoding.
  However, these can be computed on the fly in DocumentLoader when it starts
  actual writing. See ensureWriter() callsites.

- Some of extra states in DocumentWriter was needed because it had to "reset" itself.
  Once its lifetime aligns the single loading/parsing, we no longer need such reset thing.

- The main reason of dependency from DocumentWriter to Frame was DocumentWriter::begin(),
  which did connect the fresh, to-be-built Document and given Frame. This should be part
  of the DocumentWriter creation process and doesn't need to be in DocumentWriter itself.
  This change factors such setup into DocumentLoader::createWriter factory method.

BUG=none
TEST=none
R=abarth

Review URL: https://chromiumcodereview.appspot.com/17640007

git-svn-id: svn://svn.chromium.org/blink/trunk@153115 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Match spec for font-weight: bolder|lighter

Currently, bolder and lighter change font-weight in a non-compliant way
The spec (http://www.w3.org/TR/css3-fonts/#bolderlighter) defines
exactly what the computed values should be given the inherited weight
values, so we should match those.

The removed FIXME's for selecting the next lightest/heaviest weight from
the used font family seems to refer to behaviour from
CSS1 (http://www.w3.org/TR/CSS1/#font-weight), while this is replaced
with a simpler procedure for resolving bolder and lighter in font weights
in CSS2 (http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight) and
CSS3 (link above).

BUG=242041

Review URL: https://chromiumcodereview.appspot.com/15994009

git-svn-id: svn://svn.chromium.org/blink/trunk@153116 bbb929c8-8fbe-4397-9dbb-9b2b20218538