Ferroelectric and dielectric properties of sol-gel processed barium titanate ceramics and thin films