Classical and quantum big brake cosmology for scalar field and tachyonic models