std.algorithm.remove: Fix constraints and change popBack loop to popBackN

See also: https://issues.dlang.org/show_bug.cgi?id=8930
Remove with swap strategy stable requires bidirectional range for popback.