Reduce Stack complexity to below 20

This patch reduces the complexity of Stack module to be below 20 by
further splitting the handle_update method.
Since this is a pure code refactor work, no test case modification is
needed.

Change-Id: I92e58d749dedd32c73b9ea1d5b2e54be84f69003
Merge "Reduce Stack complexity to below 20"