Controlling superconductivity by tunable quantum critical points