remote capture - add a1300 and a4000 filewrite support, clean up hook code for a810, from nafraf in http://chdk.setepontos.com/index.php?topic=4338.msg101503#msg101503