Functional renormalization group for three-dimensional quantum magnetism