Judge drops charges against man accused of molesting child, having child pornography