Analysis on the minimal representation of O(p,q) II. Branching laws