Introduce 'get_length' function for streams.

Updated libcurl wrapper with optional headers processing.
Introduce 'buffer_empty' and 'buffer_full' functions.
Introduce 'get_eof' function for streams; fixed hang during slow read & fast fetch