As described in https://github.com/less/less.js/issues/2675 in-value comments are not preserved in referenced rules.
This patch adds reference marking to nodes below rules and expressions if markReferenced is available.
New logic: directive with body that contains something referenced (for
example by extend) will be shown in output too. @Media works with the same
logic - it shows up in output if it contains something visible.
Related to: #2359