Move playlist change logic out of the library while we're at it and notify the library of changes instead. fixes #302