Add API for incremental compilation

Changes from review (+7 squashed commits)
Squashed commits:
[4ce3cef] Docs, minor tidying up
[534acce] Rename "work" to "incremental", "op", etc.
[b6a398e] Create a single method for tasks to use
[3b17bf9] Cache persistence
[a906fa2] Refactor work API
[aeeacfb] Initial support for work batches
[dd2cb7b] Added basic work caching API