Merge pull request #931 from yrashk/doctest-import

Add import: option to doctests
Improve doctest exception tracking and reporting
Fix expectation error reporting in doctests
Minor doctest source code improvement
Report compile-time doctest errors during test runtime
Add insert_elem/3 and delete_elem/2 functions, deprecate setelem
in favour of set_elem

For Erlang versions prior to R16B, emulate corresponding BIFs