Use study status properly

This blocks the attachment of raw data to the study until after the study metadata is approved. It also adds two buttons for admins to approve a study and to make a study public.

This finishes #476 
It takes care of all administrative tasks for creating a function, from assigning sample templates through raw data and starting preprocessing. It also takes care of administrative tasks such as making a study private or public. It's really, really complicated because it's trying to do so many different things in a single page. I agree we should decompose it, but not in this request as it's getting added to even more.