RIM posts falling revenue, phone sales ahead of BlackBerry 10 launch