The weapon you are looking for is a human police officer.
The criteria in the question in order :
A police officer is obviously always available to a police officer giving convenience and accessibility superior to handheld weapon.
Police officers can walk or drive cars. They can even, if properly trained, navigate stairs and corners. Given proper upkeep they have essentially unlimited range. Police officers are generally authorized only within a specific area, but that limitation is generally a good thing.
Police officers are, barring injury or some other incapacitating effect, always on. This is essentially infinite rapid fire.
Methods of protection against the police are generally passive. You can take advantage of corruption or insufficient resources. Only really effective active counter-measures you can take are to avoid notice or run away. Both of those limit the amount of damage you can cause, so even then the police have strong pacifying effect.
Organized groups or serial killers have had some success with committing crimes and fading into the background before the police can respond, optimally by being gone before the crime is even reported or by preventing the crime from being reported at all. But since the goal here was to make guns obsolete, forcing criminals to be discreet is actually sufficient.
The bottom line is that there is no trivial defense against the police. You have to think about it, plan your actions to avoid detection and capture, and then execute the plans successfully.
The police can hold a person for anything from few seconds to the rest of their life. This is because they can intelligently respond to circumstances and are backed by a huge infrastructure for holding and processing people.
For the same reason the police also, despite some high profile failures, out-perform any realistic weapon in limiting collateral damage. Unless your weapon has human level intelligence and can match the flexibility of humanoid form this will remain true.
"But I was looking for a weapon for the police to use..."
The man using the weapon is always more important than the weapon. In a specific situation different weapons may be critical. Just ask anyone charging a man with an SMG unarmed. You might need a necromancer or at least a medium to do so.
But the question is on the level of the society and there effective law enforcement combined with appropriate legislation is quite sufficient. Even if guns would work just fine, their criminal use would be rare enough to have no noticeable effect on society. Some countries are fairly close to that already.
The remaining loop-holes are organized crime and the mentally-ill.
Organized crime has no particular love of guns. If the government makes a point of suppressing criminal use of guns, organized criminals will try to do without. Annoying the police usually reduces the profits, so it should be done only for a big pay off or if the police are ineffective. In fact organized crime in general exists due to inefficiency of the legal society and can be reduced to insignificance if that is prioritized.
For example, it would be trivial to erase the drug cartels by making the drugs legally available. You'd need some other method to control drug abuse, but you totally would make the cartels and most criminal gangs extinct.
Similarly Islamic militant groups are born because governments choose not to deal with something and create power vacuums for anyone who shouts loudly to fill.
In the real world preventing the birth of such groups was not a priority, but you can imagine a world where it is. In fact, I think ISIS has succeeded at making governments more aware of the value of prevention, so it might actually happen.
The mentally ill can be dealt with better mental health care. You can just wave your hands and say such issues are detected by mumble mumble and cured with abracadabra.
And the result would be a post ballistic weapon society.
"What about the military and wars? They'd still use guns..."
Sure, they still would. The whole point or organized armies is that the violence is fenced off so it doesn't contaminate civil society. Usually this works too. Sometimes it doesn't. The rise of fascism can be linked to all those young men who learned to solve problems by killing them as ordered. Countries can remain unstable for a long time after a civil war.
But if you have a setting where no major war has been fought for a generation or two, what weapons the soldiers use is irrelevant. Besides even in the US with its second amendment military weapons and weapons used in crimes have little in common. This gap is likely to widen in the future so it is fairly safe to ignore the military when planning gun free society. Especially if wars get more professional. Which is entirely reasonable assumption. The countries where the wars actually happen would of course still suffer and be far from post-ballistic, but unless your characters are soldiers or live in the war-zone that can be ignored.
And I assume that is the case since non-lethal weapons are inappropriate for war zones. You do not really want to deal with large numbers of prisoners while fighting. Killing or wounding is more practical.
"But this is totally boring..."
Most real solutions are. That said improving law enforcement and making better laws and political decisions does fail to give that WOW factor.
I'd just give the police powered armor. Powered armor is about the same complexity as car. It would thus be about as easy to regulate. It is much easier restrict powered armor to the law enforcement than to do the same for guns, which are simpler and smaller.
Powered armor would make the police better able to physically restrain people. No thug on steroids will out-wrestle a police officer wearing a powered armor. They might hurt themselves trying, though.
It is reasonable to assume a powered armor would make officers more mobile with boosted jumping and running performance. Criminals would find it hard to outrun a police officer and incidents where the police shoots a man in the back would be unlikely. Especially since the powered armor probably records everything that happens and can't be "accidentally" forgotten.
Similarly, it is powered armor, so the police would probably not be scared of some idiot of shooting them. If somebody wants to go to prison for shooting at a police officer, it is their choice. I'd expect the officers would simply wait until the fool runs out of ammunition and then go pick them up. Well, not really, the fool might try shooting someone who is not wrapped in ballistic armor or just miss, so he'd be taken down ASAP.
If you want to be even more exotic, you can use robots. Robots are even easier to make bullet proof than powered armor.
("Bullet proof" -> Resistant to weapons they are likely to get shot with.)