Parameter estimation and bias correction for diffusion processes and a nonparametric approach to census population size estimation