[Java] Add documentation on interdependency of dispose call of RocksObjects and Optimize StatsCollector