remove xRandom form bitherj
add isApplicationRunInForeground
connect less peer when in background
edit logs
Merge from upstream develop branch