Don't show activity counter if it's not adjacent to another activity (PDF)

Introduces e7471348f9839fec053b6ccbf3c6c8a2b06fe8aa

to PDF generator.
Keep a separate activity counter for every naglowek_podrozdzial tag (PDF)

Introduces 6ea7997a702f96dc5ab5f6a03cd7d80dd6a0970a

to PDF generator.