[algorithms][is_valid] fix bug occuring when linestring has two
distinct points and spikes are allowed
[algorithms][is_valid] change default behavior for linear geometries
to allow spikes
[test][is_valid] allow spikes for linear geometries