Inserted if-clauses to prevent unnecessary kernels from being enqueued

Since we only need to print the ouput (positions and energies) every "nprint"
steps, the parts 6 (download positions from device to host), 7 (download
potential energy from device to host), 5 (calculating kinetic energy
from the velocities) and 8 (downloading the kinetic energy from device
to host) only need to be performed in the step before it is printed.

Therefore, this parts were all encapsulated inside if-statements like

if ((sys.nfi % nprint) == nprint-1)

in order to prevent them from being executed when they are not
necessary.