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.
Change all of the ```pop____N```s to ```pop____Exactly```s? Note that the parameter is derived from input, so erroneous input will cause undefined behaviour.