TrustManagerImpl.cleanupCertChain should not modify original the original chain

The original frameworks/base code this was based on unconditionally
copied the chain before cleaning it which I missed on initial
refactoring. The code lazily makes the copy only it actually needs to
modify the chain.

Change-Id: I29bea6f8064d338bd625ab8ed7a89f5d96a75dfd
1 file changed