sdm: Fix layer stack caching

1. Reset the layer stack cache when the frame cannot be cached
   during GPU fallback scenarios.

2. Update checks for framebuffer refreshing to only consider whether
   animation is present on the current layer stack.

Change-Id: I3f945d432b3d387dd711e17c5ea207410646473f
2 files changed