libknot: code cleanup