Add "type" field to NAVIGATE action payload

@redonkulus @mridgway 

The value of the field could be `click` or `popstate`, representing the trigger of `NAVIGATE` action.  Do not invoke `history.pushState`, if NAVIGATE action's type was 'popstate'.

This is to fix the following history update bug:
1. pages loads with url: /a --> history is now `[/a]`
2. user clicks on a link to navigate to /b  -> history is now `[/a, /b]`
3. user clicks back button -> history became `[/a, /a]`, instead of `[/a]`