I have solved this problem by writing a small application and I will briefly explain it in case other people find it useful. As I am not 100% sure about the completeness of my workaround (it worked for me but every Business Process has its own peculiarities), I am not posting the code as a generic solution.
In my workaround I modified few jBPM and Drools sources to upgrade my existing SessionInfo and ProcessInstanceInfo records. In this small application, I read the existing session and process instances using jBPM 5.1 code and forced writing them using jBPM 5.2 code. The list of modified sources are:
Additionally, I populated two new columns (processSessionId and processId) added to Task table with jBPM version 5.2.