Dot: Clean up graph/node/edge labels in dot output

This patch removes control characters (including '\n')
from graph/node/edge names when used as labels in
dot output.