The Tensor Virial Method and Its Applications to Self-Gravitating Superfluids