chimera: fix handling of bytea data in path2inode and path2inodes stored procedures

    when migrating from 8.4 to 9.2 postgresql it was noticed that assigning of bytea data
    to varchar produced unexpected result due to bytea_output='hex' as default in postgresql 9.2
    This patch addresses it by calling encode(ifiledata,'escape') before assigning it to
    varchar variables

    Ticket: #number
    Patch: http://rb.dcache.org/r/6196
    Acked-by: Paul Millar, Tigra Mkrtchyan
    Target: trunk
    Request: 2.2
    Request: 2.6
    Request: 2.7
    Require-book: no
    Require-notes: no
Merge pull request #286 from DmitryLitvintsev/fix/2.2/r6196

    chimera: fix handling of bytea data in path2inode and path2inodes st...