Some corrections in the pop_front function.

I have repaired litle memory leak in the pop_front function.
Althought the case of single element have been corected.

There is main problem in the algorithm, write me in vk.