apcupsd - fix config and improve package

add device option.
add script to send mail reports and modify alert scripts to use it.