MAINT: != -> not_equal in hamming distance implementation

closes https://github.com/scipy/scipy/issues/4290