TS-2499: header_rewrite: fixed value substitution

This commit fixes substitution of following variables in add header:
    %<cquup>
    %<cqhm>
    %<cqhl>
    %<chi>
    %<port>
    %<proto>

Pointy hat to: me (rbtz@)
Added TS-2499 to CHANGES> This fixes #33.
TS-2499 Anal indentation changes.
TS-2500 Fix cache stripe assignment due to failed disk.
[TS-1648] Segmentation fault in dir_clear_range()
[TS-1648] Segmentation fault in dir_clear_range()