Added multiple fixes for the non-max suppression kernel.

The non-max suppression kernel was not properly thinning lines due to some errors in the conditional logic. These errors have been fixed and the code has been simplified. Resolves #16