Mechanical Strength and Wear of Dental Glass-Ionomer and Resin Composites Affected by Porosity and Chemical Composition