Port mandatory fc and network changes for websocket, api connection, state, thread and future changes

Origin: https://gitlab.com/PBSA/PeerplaysIO/tools-libs/peerplays-fc/-/merge_requests/17#note_376021642

The gap between bitshares-fc and peerplays-fc is huge and require considerable effort for porting and testing. IMHO, first port all mandatory changes that needs to address current issues.

Based on my analysis, the below PR's needs to be ported to fix issues in websocket, api connection, state, thread and future.

Note: The effort would be between 80-100hrs as there might be chances to get some other relevant changes forcefully to fix compilation/dependency problems.

Edited by blockc p