Minor extensions to Selection and Writer API.
Merge branch '0.5.x' of https://github.com/substance/document into 0.5.x