Include logic to limit axis ticks to  the number of data points for small data sets, to avoid multiple ticks with the same value.   This fixes all graphs and both Y and X axis.   Fixes pull request  https://github.com/novus/nvd3/pull/643

Also cleaned up just a bit of code.