Support creating and modifying repos

There are a few TODOs in here which I plan to address, but opening to get feedback on the approach so far.

ping @titanous 
The point of key thresholds is that the keys would be stored in separate places, so does it make sense to have this helper?