docwriter: Support markdown 3.x. Fixes #250
The headerid extension no longer exists in 3.x. Use the toc extension instead. The toc_depth option was only added in 3.x so still try headerid first.
The headerid extension no longer exists in 3.x. Use the toc extension instead. The toc_depth option was only added in 3.x so still try headerid first.