ARROW-11439: [Rust] Add year support to temporal kernels
ARROW-11439: [Rust] Add year support to temporal kernels

This adds year support to the temporal module. Year support is something needed for some TCPH queries.
Together with `extract` support
https://github.com/apache/arrow/pull/9359

we should be able to add `EXTRACT (YEAR FROM dt)` support to DataFusion.

Other changes in the PR:
* Adding some more tests to `hour`
* Removing datatype check from inner loop (there is still one more check in `value_as_datetime` and `value_as_time`) but I leave that for a future PR, as well as further performance improvements (e.g. avoiding the `Int32Builder`, avoiding null checks, adding some microbenchmarks etc.).
* Returning an error message on unsupported datatypes (instead of returning an array with nulls). This is backwards incompatible, but I think this is reasonable.

Closes #9374 from Dandandan/year

Authored-by: Heres, Daniel <61924dac3230581b78b62e9e0cd0f8203281db27@gmail.com>
Signed-off-by: Andrew Lamb <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@nerdnetworks.org>

apache/arrow,kou/arrow,cpcloud/arrow,cpcloud/arrow,apache/arrow,apache/arrow,apache/arrow,kou/arrow,laurentgo/arrow,icexelloss/arrow,cpcloud/arrow,cpcloud/arrow,apache/arrow,kou/arrow,kou/arrow,cpcloud/arrow,apache/arrow,cpcloud/arrow,laurentgo/arrow,laurentgo/arrow,cpcloud/arrow,icexelloss/arrow,kou/arrow,cpcloud/arrow,apache/arrow,wesm/arrow,laurentgo/arrow,laurentgo/arrow,icexelloss/arrow,kou/arrow,kou/arrow,apache/arrow,kou/arrow,wesm/arrow,apache/arrow,laurentgo/arrow,laurentgo/arrow,icexelloss/arrow,wesm/arrow,laurentgo/arrow,icexelloss/arrow,kou/arrow,cpcloud/arrow,laurentgo/arrow,wesm/arrow,kou/arrow,icexelloss/arrow,apache/arrow,apache/arrow,wesm/arrow,wesm/arrow,laurentgo/arrow,icexelloss/arrow,laurentgo/arrow,cpcloud/arrow,wesm/arrow,wesm/arrow,wesm/arrow,kou/arrow,wesm/arrow,laurentgo/arrow,apache/arrow,kou/arrow,kou/arrow,wesm/arrow,wesm/arrow,laurentgo/arrow,cpcloud/arrow,cpcloud/arrow,icexelloss/arrow,apache/arrow,icexelloss/arrow,cpcloud/arrow,icexelloss/arrow,wesm/arrow,icexelloss/arrow,apache/arrow,icexelloss/arrow,wesm/arrow,icexelloss/arrow,icexelloss/arrow,kou/arrow,laurentgo/arrow,laurentgo/arrow,cpcloud/arrow