appview/pages: fix concurrent write in dev mode
When in dev mode. Concurrent writes to the template map will cause a
concurrent write panic and crash appview. Quickly moving between pages
can trigger this crash. This is addressed by adding a RWMutex on the
templates. RWMutex allows multiple readers, but only one writer.
Signed-off-by: Ciel <jamie@longest.voyage>