Fix to_date's handling of year 519.
Fix to_date's handling of year 519.

A thinko in commit 029dfdf1157b6d837a7b7211cd35b00c6bcd767c caused the year
519 to be handled differently from either adjacent year, which was not the
intention AFAICS.  Report and diagnosis by Marc Cousin.

In passing, remove redundant re-tests of year value.

postmind-net/postgres-xl,arcivanov/postgres-xl,snaga/postgres-xl,kmjungersen/PostgresXL,postmind-net/postgres-xl,snaga/postgres-xl,snaga/postgres-xl,kmjungersen/PostgresXL,arcivanov/postgres-xl,arcivanov/postgres-xl,arcivanov/postgres-xl,kmjungersen/PostgresXL,kmjungersen/PostgresXL,snaga/postgres-xl,arcivanov/postgres-xl,postmind-net/postgres-xl,postmind-net/postgres-xl,snaga/postgres-xl,kmjungersen/PostgresXL,postmind-net/postgres-xl,arcivanov/postgres-xl