In a matter of days, two long-running Hong Kong court cases highlighted just how much the semi-autonomous city is shrinking under Beijing's gaze.