#1420 exporting files with security[DO NOT MERGE WIP]

Hi, I will not be able to continue on this story. I've picked up from where sumit left and refactored/mreged it to suite with the latest code. Changed some UI styling/javascript and fixed some issues around exporting to pdf with security during search.

WIth the current piece of code we can export pdf files(both photo wall and the child records) with password. 
Pending:
Exporting to CSV is still pending. We need to use Rubyzip for zipping the csv files and then adding a password for the zipped file.