The writers behind the records — from the staff professionals who supplied other people’s hits to the singer-songwriters who performed their own.