[oscurl]: new callback functionality support

    * added support for call user writeheader function
    * added support for write headers in user specified file
    * added support for write headers in stdout and stderr
    * some easy refactorings