Handle errors from Renderer._set_highlighting

It is done by moving appropriate get_highlighting calls into segment.py: here
errors from contents_func are handled as well.

This is a “fix” for #480 that will make such failures cause segment to disappear
with better header which should show segment which caused the error.

Closes #480