Build Conflict View Graph Option

Add an option to `rez build` to show the resolve graph in case of conflict.

We are finding that whenever `rez build` shows a conflict the first thing we do is dig around to find the package list and run another command to view the conflict graph.

This extra option `-g` brings that functionality one step closer.

When running `rez build -g -- --` the graph will be shown automatically.  To make this possible I had to extract the `write_graph` and `view_graph` methods from the `rez.cli.context` so I could use them without a `parser` instance.  I also raise an exception in the `build` method (rather than returning `False`) so it is clear why the process failed - this makes the logic on the cli side easier.

Also, not entirely clear on the potential values of `r.status` - it might be that this exception should only be raise if `r.status` is a particular value.