Vilhelm IV, 1493-1550, hertig av Bayern, pfalzgreve vid Rhen