PhaseTracer: tracing cosmological phases and calculating transition properties