When Francis Smith pulled the trigger on a ghost in 1804, it sparked one of the UK's strangest court cases.