Device playlists & two-way sync

Thomas,

Here's an updated pull request addressing your comments. I created another branch, with the entire enhancement contained as a single commit. From your comments elsewhere, I thought you'd prefer this over an extra commit in the original branch...

Joseph