Implement unload buffer

It took 2 years to update my PR :) BTW I have implemented nice feature. When you delete buffer then cursor stays at the same position. I'm not clearly understand all functions... so there are can be some issues with this. Would be great if someone can test it :)