Merge pull request #1518 from astrofrog/fix-exception-handling

Avoid errors in cases where ``traceback`` is None
Update developer docs for warnings
Moved content of utils.custom_warnings into utils.exceptions
Fixes to documentation
Fix tests