optimized fbuf to make use of an internal offset instead of moving memory everytime fbuf_remove() is called

extended the API to support 'prepending' a buffer trim trailing whitespace
(it was previously possible only to trim 'leading' whitespaces)

added tests