Theory of local thermal instability in spherical systems