Any city, required by § 7-286 to have a police matron, may provide a separate station for the detention of female prisoners. In any city which has no board of police commissioners or board charged with its general duties, the powers and duties hereby given and assigned to such a board may be exercised and discharged by the mayor of the city.