cli: Add more nil checking to service pretty-printer
cli: Add more nil checking to service pretty-printer

Currently, if the service mode is not "global", this code assumes that
Replicated is non-nil. This assumption may not be true in the future.
Instead of making the assumption, explicitly check that Replicated is
non-nil before using it.

Similarly, for limits and reservations, enclose methods that read from
Limits and Reservations within checks that those fields are non-nil.

Signed-off-by: Aaron Lehmann <8ecfc6017a87905413dcd7d63696a2a4c351b604@docker.com>

docker/cli,riyazdf/cli,cpuguy83/cli,ashfall/cli,Zebrilee/cli,dnephin/cli,e11137/cli,docker/cli,allencloud/cli,Zebrilee/cli,gdevillele/cli,thaJeztah/cli,cpuguy83/cli,riyazdf/cli,redpanda/cli,redpanda/cli,allencloud/cli,ashfall/cli,dnephin/cli,e11137/cli,thaJeztah/cli