Allow RowPartition to cache row_lengths and value_rowids
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this [failed invocation](https://github.com/tensorflow/tensorflow/pull/59508/checks?check_run_id=11024627164) of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request. Tacking on a tiny commit with a one-line pylint correction elsewhere in row_partition.py. Hi @JXRiver Can you please review this PR ? Thank you! Hi @JXRiver Can you please review this PR ? Thank you! Hi @JXRiver Can you please review this PR ? Thank you! Hi @JXRiver Can you please review this PR ? Thank you! Due to concern of out of graph errors caused by cached graph tensor, I am going to close this PR now.
Modifies `row_lengths()` and `value_rowids()` methods of the RowPartition class to store their outputs by default when first called if they have not already been precomputed; the stored value will be returned instead of re-computing when called again (~9x speedup for `row_lengths()` and ~37x speedup for `value_rowids()` in a quick test). This behavior can be suppressed by passing `cache=False`.

This change improves consistency between performance when using RowPartitions (and RaggedTensors) created with different methods. The `from_value_rowids` and `from_row_lengths` methods already cache whichever of row_lengths and value_rowids are available. With this change, repeated calls to `row_lengths()` and `value_rowids()` are equally fast for RowPartitions / RaggedTensors created with `from_row_splits` and other methods.