chapter 8 exercise: implement remove algorithm

an implementation that rearrange both retained and removed range
chapter 8 exercise: another remove algorithm that has same behavior as that in standard library