7020499: Project Coin: improvements to try-with-resources desugaring
Summary: Avoid unnecessary check for resource nullness if the resource is known to be non-null; put resource closing code in a method that is shared by multiple try-with-resources.
Reviewed-by: darcy, mcimadamore, vromero