Modal versus nonmodal linear stability analysis of river dunes