Refs #3910. Generic method for closing a lightbox added.

Merge after https://github.com/Elgg/Elgg/pull/336