Enable automatic HTML-escaping for @code tags

This brings doclava behavior closer to Javadoc.

There are many associated source code javadoc comment and .jd file
changes to prevent double-escaping that must be committed at the same
time as this.

The best way to review this change is to generate the docs before
and after patching the changes and use a bulk diff tool to compare the

Note 1: This means that the following case comes into line with

class MyClass {
  public X myMethod() {}

The @Override will end up being interpreted as a standalone tag.
(e.g. like @param, @return, etc.). This only happens when the '@'
character begins a line. This is a problem for Javadoc too. This
used to be "fixed" on Android by using @ to replace the @, but
that's no longer possible. Instead, the usual fix is to use
<code></code>, use &#64; and do escaping of <,>,& as needed instead.

class MyClass {
  public X myMethod() {}

Note 2: This change also causes '>' characters to be escaped in the .html
output that were previously *not* escaped in the source (but were typically
handled by browsers in a lenient manner and displayed as '>' anyway).

Bug: 25757239
Change-Id: I5ed5477354ef0e955aa33be73ea7188f8407e33a
1 file changed