Is it OK to swap batteries while phone is connected to wall charger? It takes a few minutes to shut down and restart the phone, it would sometimes be handy to be able to swap batteries without shutting down (i.e. swap in a fully charged battery before going out).     Will the phone operate without a battery while connected to a wall charger?   Is it safe to swap the battery without shutting down?
It's device dependent, if the manufacturer can fit in the circuitry to use the wall charger without the battery then yes you'd be able to do that. Most laptops can run without batteries, I doubt many smartphone does though; phones are primarily designed to be used while on the go, while laptops are more likely to be plugged in.

A safe test is to shutdown the phone normally, plug the phone into charger, and pull out the battery, then try booting up the phone with only wall charger. If you can boot up, then it's 90% likely that you'll be able to pull out the battery while it's running without causing a reboot.


  Is it safe to swap the battery without shutting down?


If the phone doesn't have the appropriate circuitry, it will be no less safe than just unplugging the battery. There is no moving parts in a mobile phone and all modern hardware are designed such that complete loss of power will just reinitialize the hardware as if it's just booting up. Therefore the only possible damage you can do is to the file system. 

Modern journalled file systems are designed to be able to withstand power loss. If you're using journaled filesystem, e.g. ext3 or ext4, then your data should be safe; if using unjournalled filesystem, e.g. FAT or ext2, then there is a small chance of file system corruption.