Merge pull request #310 from yihui/master

closes #277: implement actionButton.setValue()
fixes #299: RJSONIO is unable to convert a matrix of 0 row to [], in which case we have to use an empty list() instead

toJSON(list(x = matrix(nrow = 0, ncol = 3))) gives '{\n "x":  \n}', which is an invalid JSON expression