Framework for serializing structures to XML

This adds several helper functions for serializing to XML:

* ol.xml.serialize: Counterpart to ol.xml.parse. By splitting
  the serialization process up into a node factory and a node
  writer, note writers can easily be used for different
  namespaces.

* ol.xml.pushSerializeAndPop: Counterpart to
  ol.xml.pushParseAndPop.

* ol.xml.makeStructureNS: Works like ol.xml.createParsersNS,
  but works for arbitrary structures.

* ol.xml.makeChildAppender: If the top item of the stack has
  the new ol.xml.NodeStackItem type, this helper function
  can be used to create a serializer that appends the current
  node to its designated parent.

* ol.xml.makeChildNodeFactory: Creates a node factory which
  produces child nodes from an array of node names which are
  passed to ol.xml.serialize.

* ol.xml.makeSequence: A convenience function for creating
  xsd:sequence structures. Takes an object literal and an
  ordered list of the keys, and returns an array that can be
  passed as values to ol.xml.serialize.

* ol.xml.makeSimpleTypeWriter: Using e.g. the new write*TextNode
  functions from ol.format.XSD, this function creates a node
  writer that writes simple type nodes for values like strings
  or numbers.

The following commits will be using this new framework for
implementing ol.format.GPX.writeFeatures, and prose
documentation with instructions based on what was said above
will be added.
Added wpt serialization for ol.format.GPX
Replace subtractViewRotation with rotateWithMap
Pass view rotation to replay
Activate rotateWithMap option in ol.render.canvas.Replay
Pass view rotation to ol.render.canvas.Immediate
Activate rotateWithMap option in ol.render.canvas.Immediate
Rename rotateWithMap to rotateWithView
Document rotateWithView option
New makeChildrenAppender function and Node factory refactoring

The makeChildAppender function is used for adding a node of a
type with maxOccurs=1. For adding nodes of a type with
maxOccurs>1, the new makeChildrenAppender function was added.

With this new function, it turned out that more convenience for
creating node factories is required. The makeChildNodeFactory
function was renamed to makeSimpleNodeFactory, and it now can
create node factories where not only the namespace, but also the
node name can be fixed.
Added rte serialization for ol.format.GPX
Simplify annotations
Add trk serialization for ol.format.GPX
Documentation and cleanup
Get rid of compiler warnings
Merge pull request #1739 from twpayne/rotate-with-map

Allow icons to be rotated with the map
namespaceURI can be null, but not undefined
No magic for namespace URI
Put jsdoc comment into effect
Merge pull request #1716 from ahocevar/gpx-write

Write support for ol.format.GPX