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.
`s/popBackN/popBackExactly/`

`popBackN` will actually pop "up to" `N` elements, checking for empty in between each call.