reworked how swap functions reference values

Signed-off-by: nixnodes <code@eth.si>
Implemented heapsort algorithm (rev. 20_b1)
'--loadqa' and '--swapsort' (rev. 20_b1)

Signed-off-by: nixnodes <code@eth.si>