Superfluid and insulating phases in an interacting-boson model: mean-field theory and the RPA