Onsager-Machlup functional for Volterra equations perturbed by noise