support document.cookie for app protocol

part of req for #1012
support filesys api for app protocol