Newcastle United squandered a 2-1 lead to lose the Tyne-Wear derby at St James' Park, with several players performing poorly.