Gazelle: support for proto rules (#868)

Gazelle now generates proto_library, go_proto_library, and
go_grpc_library rules. proto_library will contain .proto files in a
directory. go_{proto,grpc}_library are buildable libraries, linked
with the proto_library. A go_library rules embeds the
go_{proto,grpc}_library and includes an extra .go sources (but .pb.go
files are excluded).

The new proto rule generation is turned on by default in packages that
don't have existing proto rules. If there are existing rules, proto
rule generation will either follow previous behavior (if
go_proto_library.bzl is loaded) or will be disabled (if
go_proto_library is loaded from some other repo). The proto mode can
be selected explicitly with the -proto command line flag or with the
'# gazelle:proto' directive. Legacy rules can be migrated with
'gazelle fix'.

Limitations:

* Gazelle still only allows one package per directory. Gazelle infers
  package name and import path from .proto files. These must match
  other files in the directory.
* Import resolution is fairly crude and is just a guess, based on
  the import string.
* There's no way to import protos from other repositories, except for
  Well Known Types.

Fixes #808
35 files changed