TST: adapting scaling tests to error

The nan2zero check causes errors I didn't intend for some other tests;
disable nan2zero check in those cases.
RF: refactor nan2zero errors

Check nan_fill by casting as the output type.
TST: extend nan2zero tests

Add tests to show that nan gets translated to the same value as 0 if
nan2zero is set.
API+TST: errors for bad scaling in array_to_file

It's time consuming to test for NaNs when converting from integers to
integers, and we don't want to check whether nan2zero value is within
range if there can be no NaNs, so raise errors for scaling that will
generate NaNs.  Next we add tests to confirm that we're not checking the
nan2zero nan_fill value for int to int scaling.
TST: fix nan2zero tests, test nanfill for ints

The tests for int types were broken because I was setting nan2zero to
False.
RF+TST: refactor scaling test for nan_fill check

Check error in cases where nan_fill value is outside range.
RF+TST: add check_nan to finite_range function

Extend tests for finite_range function.

Add check_nan input argument.

Refactor for speed in default case of no nans or infs.
NF: add benchmarks for finite_range, array_to_file

Add benchmarks; use git hash to show what's running if possible.
API+BRK+TST: change ArrayWriter nan2zero API

We need to know nan2zero when calculating the scaling for arrays, so we
need nan2zero at the array writer __init__, and we can't use it when
calling `to_fileobj` as we have been up until now, because it would
involve recalculating the scalefactor on the fly, which would break the
API too.

I'm guessing no-one is using nan2zero=False as an argument to
`to_fileobj`, but in case they are, check if it's the same as the
__init__ value, raise an error if not, deprecation warning if so.

The tests are still broken because I haven't fixed the scaling yet.
RF: extend finite range to handle complex

Code already handles complex in the float-like way that max works for
complex; allow and test.
API+RF: add has_nan property to arraywriter classes

Add has_nan property as part of the API.  Test.
RF: take nan2zero into account for scaling values

Including some fancy footwork to keep the precision high for the
intercept.
WIP: refactor and explanation of scaling