Ricciardo gets first F1 win edging series leader Rosberg