Fix addLineClass (and similar) returning null on no-op

When the call didn't result in an actual change (for example
line already had the given class), changeLine would return null.

This doesn't seem useful, and caused issue #2438. It now always
returns the line handle (as documented).