ast_java: shared_ptr everywhere

So that these things will be deleted so that we can turn on leak
detection and so that checks in the destructor (like asserting that
"CheckValid" is called) are actually meaningful.

(note, this is more straightforward than simply rewriting this to not
use ast_java at all due to things like outline methods)

Bug: 37749857
Test: runtests.sh
Test: less leaks reported
Change-Id: Icc59069b9e3b660d0878bc338c86c30b80bb5e18
5 files changed