Improve and clean NetError (usage)

1. define @IntDef instead of class in the Java code (it allows to use @NetError annotation and @IntDef profits)
2. provide OK value in Java version (like in C++ version)
3. use OK instead of 0 in C++ code (and use NetError error for -3 value in Java code)

BUG=919666

Change-Id: I671b27e37daae9dc63e6e8b9eb8e175585725e03
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1574808
Commit-Queue: Marcin Wiącek <[email protected]>
Reviewed-by: Paul Jensen <[email protected]>
Reviewed-by: Changwan Ryu <[email protected]>
Reviewed-by: Dominick Ng <[email protected]>
Reviewed-by: Adam Langley <[email protected]>
Reviewed-by: Yusuf Ozuysal <[email protected]>
Reviewed-by: Bo <[email protected]>
Cr-Commit-Position: refs/heads/master@{#655766}
13 files changed