Electromagnetic field correlators and the Casimir effect for planar boundaries in AdS spacetime with application in braneworlds