Add new flag for theano profiling output cropping

Fixes #2080 . This pull requests adds a new flag, profiling.output_line_width, which can be set to limit the line length of the profiling output. Its default value is 512.

The change is the way the variables maxlen are computed is to avoid an invalid behavior when line_width is smaller than upto_length.