Time-dependent restricted-active-space self-consistent-field theory for bosonic many-body systems