Integrated Piezoelectric and Pyroelectric Devices from Thin Film Ferroelectrics