Updated state detector list handling

Updated state detected so now it will be able to handle the list
(unordered and ordered) case where the given node is the parent node
rather than a text node.
If the direct children contain an ordered or unordered list it will
return true for the respective state. Both unordered lists and ordered
lists can be true with this change.
getselectedtextnodes

make getselectedtextnodes return all the nodes if there is no direct
selection
remove unused line
Merge pull request #18 from gshenar/master

Updated state detector list handling