[XWALK-DRIVER] refactor and test capabilities module