Man charged after Bedford police officer shot in struggle appears in court