Bias Reduction and Metric Learning for Nearest-Neighbor Estimation of Kullback-Leibler Divergence