What happens to the battery during bootloader/recovery? I want to know what happens to the battery (does it charge/discharge/stay constant?) when the device is in bootloader or recovery mode. In both of these modes, a USB may or may not be connected.

If the battery does charge, could that possibly be a feature that could be a result of the installed recovery/bootloader, or could the charging feature be hardware dependant?
Charging control is done via hardware to prevent ruining the battery in case of software errors. That is why (most?) devices charge even when powered off. The status display that is then shown is just a "minimal OS" that queries the current status from the battery charger hardware.