refactored linestyle handling for lines

Problem: cyclic import of backend_bases