build: factor out build flags
We currently have all flags related to build options defined in the cmd
package. These flags are as a side-effect to the CommandLine
flagset. This commit factors it out into the build package and allows
setting it on a different flagset.
This is working towards creating command line arguments from a
BuildOptions struct. This can be used by indexserver.
Change-Id: Ibb711b3620d68571325d52f5507f99b7fab234e3