object_validator: Refactor most of validate/2 to a generic block See merge request pleroma/pleroma!3383