TV mogul Shonda Rhimes has admitted she suffered sleepless nights over security fears after being deluged with death threats over social media.