“If the court makes a quashing order or issues a declaration but declines to make a mandatory order, the matter remains in the hands of the public authority which may be best placed to take account of all interests with full relevant information about them. Having said that, the nature of a breach of a legal duty on the authority may be such as to call for the grant of mandatory relief in order to compel the authority to do what it has a clear legal duty to do.”