Fix missing GN dependencies.
Fixes some cases where a dependency between a target's inputs and outputs exists without an explicit dependency.
json_schema_api.gni was generating wrong names, this was fixed.
mojo_application_package.gni was fixed to generate unique names (just a bug I noticed in passing) and support the testonly flag, which is necessary when I added the correct dependency.
The rest of the cases are just adding deps or making existing deps public so that the ability to depend on the target's outputs is passed to dependents.
BUG=487897
TBR=dpranke
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg
Previously landed as https://codereview.chromium.org/
1128163007/ the issue there should have been fixed by https://codereview.chromium.org/
1148173002/ which has already been landed.
Review URL: https://codereview.chromium.org/
1134753011
Cr-Commit-Position: refs/heads/master@{#331625}