gnmi: Accept origin and target in either order
gnmi: Accept origin and target in either order

Right now, specifying origin and target in the wrong order (target then
origin) doesn't work, as the client silently drops the target but sends
the request anyway. This can result in the server simply returning
no data, if the server is the default target and it doesn't have the
requested data.

I've changed the argument parsing to accept either order.

The following manual checks do the expected thing:

$ go run cmd/gnmi/main.go -addr=<device> -username=<user> -password=<pass> -mode once subscribe /system/aaa
$ go run cmd/gnmi/main.go -addr=<device> -username=<user> -password=<pass> -mode once subscribe /system/state /lldp/state
$ go run cmd/gnmi/main.go -addr=<nms> -token <tok> -mode once subscribe target=<deviceID> origin=openconfig /system/aaa
$ go run cmd/gnmi/main.go -addr=<nms> -token <tok> -mode once subscribe origin=openconfig target=<deviceID> /system/aaa
$ go run cmd/gnmi/main.go -addr=<device> -username=<user>-password=<pass> update /system/config/login-banner 'LOGIN BANNER LOGIN BANNER'
$ go run cmd/gnmi/main.go -addr=<device> -username=<user> -password=<pass> update /system/config/login-banner 'OTHER LOGIN BANNER' replace /system/config/motd-banner 'MOTD MOTD'
$ go run cmd/gnmi/main.go -addr=<device> -username=<user> -password=<pass> update origin=openconfig target=<deviceID> /system/config/login-banner 'OTHER LOGIN BANNER' replace /system/config/motd-banner 'MOTD MOTD'
$ go run cmd/gnmi/main.go -addr=<device> -username=<user> -password=<pass> update origin=openconfig target=<deviceID> /system/config/login-banner 'OTHER LOGIN BANNER' replace origin=openconfig /system/config/motd-banner 'MOTD MOTD'
$ go run cmd/gnmi/main.go -addr=<device> -username=<user> -password=<pass> delete /system/config/motd-banner

Change-Id: I6ff5a3d102df9b5177317b09a1d726f2fc19f02a

aristanetworks/goarista,aristanetworks/goarista