Cleaned up adaptive bilateral filtering

eliminated magic numbers, added a baseline standard deviation (this also avoids division by zero on constant images), and also added weights calculated by Gaussian interpolation (more typical in the case of the usual bilateral filter).