The Complexity of Norm Synthesis and Revision