Fix DartPriorityFilesHelper_NEW test.

TBR

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//673103003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@41274 260f80e4-7a28-3924-810f-c04153c831b5
Several bugfixes in dart:io's handing of sockets

This CL includes fixes for the following issues:

a) The event handler created listening socket metadata (values of a hashtable
indexed by filedescriptor) sometimes as SocketData and sometimes as
ListeningSocketData depending whether the socket has been listened to or not.
This was very buggy, in particular because multiple isolates can have a
reference to the same server socket in different states (opened, listened,
closed).

=> This should be fixed by sending the file descriptior typeMask always to the
   eventhandler.

b) A server socket cloned via the ServerSocketReference mechanism, opens a
receive port for sending (fd, address, port) to isolates/... which want to
create a server socket from the reference.
This receive port was not closed properly when calling only close() (and not
listening first).

=> This should be fixed by closing this receiveport on the ServerSocket.close()
   call as well.

c) It was assumed in the event handler that a close command needs to have the
Dart_Port in a hash table. But this is only the case if the user actually
listened to the ServerSocket. Otherwise the event handler does not know about
the server socket. This caused a NULL dereference which resulted in a SEGFAULT.

=> This should be fixed by checking if the Dart_Port is in the hashmap of the
ListeningSocketData or not.

d) Too many bits were considered when extracting token count in C++ code.

The CL includes a regression test which should trigger these issues.

BUG=21384,21383
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//665823007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@41276 260f80e4-7a28-3924-810f-c04153c831b5
Simplify SnapshotReader::LookupInternalClass.

All callers of this function assert that the returned RawClass
is non-null. Also, the returned Class is only used to extract its class id.

I removed the unreachable code and simplified it accordingly to just return
the class id directly.

R=asiva@google.com

Review URL: https://codereview.chromium.org//672183002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@41277 260f80e4-7a28-3924-810f-c04153c831b5