Non-extremal geometries and holographic phase transitions