Matthew Nicks to coach Adelaide in AFL